Rating:

```
import sys
from Crypto.Cipher import AES
import base64

def dec(cip, key):
plain=""
for i in range(len(cip)):
space = 0x20
val = 0x7e - 0x20 + 1
val2 = ord(key[i % len(key)])
plain+=chr((((ord(cip[i]) - space) - (val2 - space)) % val) + space)
return plain

key1 = "SECCON"
key2 = "seccon2019"
cipher = "FyRyZNBO2MG6ncd3hEkC/yeYKUseI/CxYoZiIeV2fe/Jmtwx+WbWmU1gtMX9m905"

plain_1 = base64.b64decode(cipher)
cipher = AES.new(key2 + chr(0x00) * (16 - (len(key2) % 16)), AES.MODE_ECB)

p = 16 - (len(plai_1) % 16)
plain_2 = cipher.decrypt(plain_1+ chr(p) * p)

print(plain_1=dec(plain2,key1))
```