巨量 data加密

巨量 data加密
巨量 data加密_第1张图片

巨量算数-数据解密

def decrypt_code(data):
    key = 'qq:417398600'.encode(encoding='utf-8')
    iv = 'qq:417398600'.encode(encoding='utf-8')
    decode = base64.b64decode(data)
    decrypt = AES.new(key, IV=iv, mode=AES.MODE_CFB, segment_size=128)  # mode = 'aes-128-cfb'
    txt = decrypt.decrypt(decode)
    return str(txt.decode('utf-8'))

读取加密数据

f = open('巨量算数文件.txt', 'r')
data = f.read()
data = json.loads(decrypt_code(data))
print(data)

‘’’
{‘data’: [{‘name_en’: ‘age’, ‘name_zh’: ‘年龄’, ‘label_list’: [{‘label_id’: ‘110010410’, ‘name_zh’: ‘18-23’, ‘value’: 0.2101, ‘tgi’: 233.56970214302223}, {‘label_id’: ‘110010411’, ‘name_zh’: ‘24-30’, ‘value’: 0.2844, ‘tgi’: 173.93681733739203}, 。。。。。。。。
‘’’

你可能感兴趣的:(python)