弃用代码,准备 checkout 到孤儿分支。
This commit is contained in:
@@ -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