搜索t.data.data
return e.abrupt(“return”, d(t.data.data, t.headers[“x-encrypted”]));
这段是返回加密
之后单步调式,点开作用域闭包c,看到key和iv
key和iv都是结尾有==,所以是base64编码,使用时要用base64解码,unintarray也是先转base64再转字符串。还有加密文本用base64解码
https://blog.csdn.net/wangenjie1992/article/details/135385014
key = "SjXbYTJb7zXoUToSicUL3A=="
iv = "OekMLjghRg8vlX/PemLc+Q=="
formatedKey = base64.b64decode(key)
formatedIv = base64.b64decode(iv)
print(formatedKey)
print(formatedIv)
key = bytes(key, encoding='utf-8')
iv = bytes(iv, encoding='utf-8')
decryptedData = AES.new(formatedKey, AES.MODE_CBC, formatedIv).decrypt(
base64.b64decode(encryptedStr)
)
print(re.sub(r"\f|[\x00-\x1F\x7F-\x9F]", "", decryptedData.decode("utf-8")))
key和iv全是数字的是字节码,要用字节解码,还有加密文本用字节解码
iv = '0123456789ABCDEF'#偏移量
key = 'jo8j9wGw%6HbxfFn'#密钥
key = bytes(key, encoding='utf-8')
iv = bytes(iv, encoding='utf-8')
cipher = AES.new(key, AES.MODE_CBC, iv)#创建一个AES对象(密钥,模式,偏移量)
decrypt_bytes = cipher.decrypt(bytes.fromhex(content))#解密
result = str(decrypt_bytes, encoding='utf-8')#编码转换