弃用代码,准备 checkout 到孤儿分支。
This commit is contained in:
@@ -1,14 +1,33 @@
|
||||
# This file contains the config of the whole project.
|
||||
# DO NOT share your crtical info to others.
|
||||
# Change the file name from .settings.py to settings.py.
|
||||
from sdgb import aimedb_api, felica
|
||||
from sdgb import aimedb_api, felica, mifare
|
||||
|
||||
accessCode = 50000000000000000000
|
||||
IDm = "0000000000000000"
|
||||
|
||||
felica(IDm)
|
||||
########## Felica Card ##########
|
||||
#################################
|
||||
## 这一部分仅作为参考,相关 API 已被 AiMeDB 禁用。
|
||||
|
||||
# accessCode = "50000000000000000000"
|
||||
# IDm = "0000000000000000"
|
||||
# felica(IDm)
|
||||
# userId = aimedb_api(accessCode)
|
||||
#################################
|
||||
##################################
|
||||
|
||||
|
||||
########## Mifare Card ##########
|
||||
#################################
|
||||
|
||||
accessCode = "01036000000000000000"
|
||||
serialNumber = "00000000"
|
||||
|
||||
|
||||
userId = mifare(accessCode, serialNumber)
|
||||
#################################
|
||||
##################################
|
||||
|
||||
|
||||
userId = aimedb_api(accessCode)
|
||||
|
||||
# 上传的乐曲成绩
|
||||
# 此成绩将覆盖原有成绩
|
||||
|
||||
@@ -5,7 +5,7 @@ import httpx
|
||||
|
||||
def DownloadOrder():
|
||||
ua = 'Windows/3.0'
|
||||
content = b'game_id=SDGA&ver=1.55&serial=A63E01E0048&encode=UTF-8'
|
||||
content = b'game_id=SDGA&ver=1.56&serial=A63E01E0048&encode=UTF-8'
|
||||
body = base64.b64encode(zlib.compress(content))
|
||||
r = httpx.post(
|
||||
'http://naominet.jp/sys/servlet/DownloadOrder',
|
||||
@@ -28,7 +28,7 @@ def uri():
|
||||
r = httpx.get(
|
||||
endpoint,
|
||||
headers = {
|
||||
'User-Agent': 'A63E01E0048',
|
||||
'User-Agent': 'A63E01E0000',
|
||||
}
|
||||
)
|
||||
resp_data = r.content
|
||||
|
||||
@@ -77,6 +77,7 @@ def sdgb_api(data, useApi, userId):
|
||||
proxy = "http://127.0.0.1:6152"
|
||||
)
|
||||
resp_enc = r.content
|
||||
print(resp_enc)
|
||||
try:
|
||||
resp_def = aes.decrypt(resp_enc)
|
||||
except:
|
||||
|
||||
@@ -3,6 +3,7 @@ from Crypto.Cipher import AES
|
||||
from Crypto.Util.Padding import pad
|
||||
import base64
|
||||
import httpx
|
||||
import re
|
||||
|
||||
def enc(key, iv, data):
|
||||
cipher = AES.new(key, AES.MODE_CBC, iv)
|
||||
@@ -14,14 +15,12 @@ def dec(key, iv ,data):
|
||||
decrypted = de_cipher.decrypt(data)
|
||||
return decrypted
|
||||
|
||||
def hello():
|
||||
def DownloadOrder():
|
||||
key = bytes([ 47, 63, 106, 111, 43, 34, 76, 38, 92, 67, 114, 57, 40, 61, 107, 71 ])
|
||||
#key = bytes([ 45, 97, 53, 55, 85, 88, 52, 121, 57, 47, 104, 40, 73, 109, 65, 81 ])
|
||||
iv = bytes.fromhex('00000000000000000000000000000000')
|
||||
ua = 'SDGB;Windows/Lite'
|
||||
#ua = 'SDHJ;Windows/Lite'
|
||||
content = bytes([0] * 16) + b'title_id=SDGB&title_ver=1.50&client_id=A63E01C2805&token=205648745'
|
||||
#content = bytes([0] * 16) + b'title_id=SDHJ&title_ver=1.11&client_id=A63E01E1326&token=205648745'
|
||||
content = bytes([0] * 16) + b'title_id=SDGB&title_ver=1.51&client_id=A63E01C2805&token=205648745'
|
||||
header = bytes.fromhex('00000000000000000000000000000000')
|
||||
bytes_data = pad(header + content, 16)
|
||||
encrypted = enc(key, iv, bytes_data)
|
||||
@@ -39,4 +38,19 @@ def hello():
|
||||
decrypted_str = decrypted_bytes.decode('UTF-8')
|
||||
print(decrypted_str)
|
||||
|
||||
hello()
|
||||
def uri():
|
||||
data = DownloadOrder()
|
||||
pattern = r"https://[^\s]+"
|
||||
endpoint = re.search(pattern, data).group()
|
||||
r = httpx.get(
|
||||
endpoint,
|
||||
headers = {
|
||||
'User-Agent': 'A63E01E0000',
|
||||
}
|
||||
)
|
||||
resp_data = r.content
|
||||
response = resp_data.decode()
|
||||
return response
|
||||
|
||||
if __name__ == "__main__":
|
||||
print(uri())
|
||||
Reference in New Issue
Block a user