大佬们帮忙看看代码怎们改
from Crypto.Util.Padding import pad, unpadfrom Crypto.Cipher import AES
BLOCK_SIZE = 32 # Bytes
key = 'DoWj(T1I4I*0b43F'
cipher = AES.new(key.encode('utf8'), AES.MODE_ECB)
with open('171110b8b3365a0d4be6c1a7f06eb473.pdf','rb') as f:
text = f.read()
msg = cipher.encrypt(pad(text, BLOCK_SIZE))
decipher = AES.new(key.encode('utf8'), AES.MODE_ECB)
msg_dec = decipher.decrypt(msg)
with open("1121.pdf","wb") as f:
f.write(msg_dec)
大佬们帮忙看看是哪里写错了,密码应该没问题,其他方法解开了的。https://wss1.cn/f/7crgcq4o5ji 复制链接到浏览器打开
# -*- coding: utf-8 -*-
from Crypto.Cipher import AES
BLOCK_SIZE = 32 # Bytes
key = 'DoWj(T1I4I*0b43F'
with open('171110b8b3365a0d4be6c1a7f06eb473.pdf','rb') as f:
text = f.read()
decipher = AES.new(key.encode('utf8'), AES.MODE_ECB)
msg_dec = decipher.decrypt(text)
with open("1121.pdf","wb") as f:
f.write(msg_dec) s1986q 发表于 2022-1-13 20:46
# -*- coding: utf-8 -*-
from Crypto.Cipher import AES
BLOCK_SIZE = 32 # ...
我最开始这样的,可以解密这一个,但其他的问题更多 很简单啊 拿着板凳看大佬解题
页:
[1]