大概率的加密方式:DES/CBC/PKCS5Padding
密钥:iscooler
加密数据比较长放蓝奏云了,https://wwyh.lanzouw.com/ixfwr2e4lhdc
[Python] 纯文本查看 复制代码from Crypto.Cipher import DES # pip install pycryptodome
from base64 import b64encode,b64decode, encodebytes
from Crypto.Util.Padding import unpad
with open('encrypted_data.txt','r',encoding='utf-8') as f:
encrypted_data = f.read()
'''
大概率的加密方式:DES/CBC/PKCS5Padding
密钥:iscooler
'''
encrypted_data = b64decode(encrypted_data)
# padded_data = unpad(encrypted_data, 8) # 移除PKCS5填充
cryptor = DES.new('iscooler'.encode(), DES.MODE_CBC)
ciphertext = cryptor.decrypt(encrypted_data)
print(ciphertext)
result = ciphertext.decode('UTF-8').strip()
print(result)
尝试过decode('UTF-8'), unpad(encrypted_data, 8) 未成功