23 lines
421 B
Python
23 lines
421 B
Python
![]() |
#!/usr/bin/env python3
|
||
|
from Cryptodome.Cipher import AES
|
||
|
from base64 import b64decode
|
||
|
|
||
|
KEY = b'931069B52546C2DF278CD52EE695D4F2'
|
||
|
|
||
|
|
||
|
def decode(enc):
|
||
|
enc = b64decode(enc)
|
||
|
return enc[16:], enc[0:16]
|
||
|
|
||
|
|
||
|
def decipher(enc, iv):
|
||
|
cipher = AES.new(KEY, AES.MODE_CBC, iv=iv)
|
||
|
return cipher.decrypt(enc)
|
||
|
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
from sys import argv
|
||
|
enc, iv = decode(argv[1])
|
||
|
print(decipher(enc, iv))
|
||
|
|