Python AES Decrypt Code
Python AES Decrypt Code
import base64
import hashlib
from Crypto.Cipher import AES // python 2.7에서 사용 가능
BS = 16
pad = (lambda s: s + (BS - len(s) % BS) * chr(BS - len(s) % BS).encode())
unpad = (lambda s: s[:-ord(s[len(s)-1:])])
key = '[key]'
message = '[Encrypted Message]'
iv=key[:16]
enc = base64.b64decode(message)
cipher = AES.new(key, AES.MODE_CBC, iv)
dec = cipher.decrypt(enc)
decrypt = unpad(dec).decode('utf-8')
print(decrypt)
'Pentest > [WEB]' 카테고리의 다른 글
CUBRID Database sql Injection 예시 (0) | 2020.08.28 |
---|---|
CVE-2019-17558 Apach Solr RCE 취약점 (1) | 2020.04.15 |
SSH Tunneling (OUTBOUND Tunneling) (0) | 2019.02.18 |
TAGS.