#!/usr/bin/env python3 from Crypto.Cipher import AES from Crypto.Util.Padding import unpad import base64 if __name__ == "__main__": key = b"\x4e\x99\x06\xe8\xfc\xb6\x6c\xc9\xfa\xf4\x93\x10\x62\x0f\xfe\xe8\xf4\x96\xe8\x06\xcc\x05\x79\x90\x20\x9b\x09\xa4\x33\xb6\x6c\x1b" iv = b"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" cipher = AES.new(key, AES.MODE_CBC, iv) b64_ciphertext = "edBSHOwhZLTjt/QS9FeIcJ83mjWA98gw9guKOhJOdcqh+ZGMeXOsQbCpZ3xUjTLfCuNH8pG5aSVYdYw/NglVmQ" b64_ciphertext += "=" * (((4 - len(b64_ciphertext)) % 4) % 4) raw_ciphertext = base64.b64decode(b64_ciphertext) plaintext = unpad(cipher.decrypt(raw_ciphertext), AES.block_size) print(plaintext.decode())