本帖最后由 aiai 于 2020-2-9 20:25 编辑
我首先用python测试了一下,可以正常解密
[Python] 纯文本查看 复制代码 from Crypto.Cipher import AES
with open('ky.txt', 'rb') as f:
key = f.read()
with open('1.pdf', 'rb') as f:
pdf = f.read()
cryptor = AES.new(key=key, mode=AES.MODE_ECB)
with open('2.pdf', 'wb') as f:
f.write(cryptor.decrypt(pdf))
如果要调用openssl的话我不太懂,但是应该要用16进制的KEY和IV
将ky.txt转换为16进制KEY=214B5557657538437445516C53614B25
[Python] 纯文本查看 复制代码 with open('ky.txt', 'rb') as f:
key = f.read().hex().upper()
然后再用命令
[Asm] 纯文本查看 复制代码 openssl aes-128-ecb -d -K 214B5557657538437445516C53614B25 -iv 00000000000000000000000000000000 -nosalt -in 1.pdf -out 2.pdf
但是我没有测试过能不能解密成功
|