Relative Content

Tag Archive for pythonencryptioncryptographyaespycrypto

why i can’t print the code which i can execute which decrypted pycryptodome

from Crypto.Cipher import AES from Crypto.Util.Padding import unpad import base64 key = ‘cgnu41zIiDM4b5EYJsKuHw==’ iv = ‘A69plLM7xNv59irIwN+qrg==’ ciphertext = ‘cipher text’ def decrypt_script(): key_bytes = base64.b64decode(key) iv_bytes = base64.b64decode(iv) ct_bytes = base64.b64decode(ciphertext) cipher = AES.new(key_bytes, AES.MODE_CBC, iv_bytes) decrypted_bytes = unpad(cipher.decrypt(ct_bytes), AES.block_size) exec(decrypted_bytes, globals()) decrypt_script() it’s working but if i change exec() to print() it’s not printing […]