我是不会改名的 发表于 2022-1-13 20:07

大佬们帮忙看看代码怎们改

from Crypto.Util.Padding import pad, unpad
from 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 复制链接到浏览器打开

s1986q 发表于 2022-1-13 20:46


# -*- 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)

我是不会改名的 发表于 2022-1-13 21:09

s1986q 发表于 2022-1-13 20:46
# -*- coding: utf-8 -*-
from Crypto.Cipher import AES
BLOCK_SIZE = 32 # ...

我最开始这样的,可以解密这一个,但其他的问题更多

suxiaoyu 发表于 2022-1-26 17:33

很简单啊

ymhld 发表于 2022-1-27 09:41

拿着板凳看大佬解题
页: [1]
查看完整版本: 大佬们帮忙看看代码怎们改