#!/usr/bin/python2 import hashlib, os, signal, struct, sys from Crypto.Cipher import AES key = 'this is not the flag nor the key'[:16] db = { } def md5(data): return hashlib.md5(data).digest() def decrypt(data): iv = os.urandom(16) aes = AES.new(key, AES.MODE_ECB, iv) data = aes.decrypt(data) return data.rstrip('\0') def reply_plain(message): sys.stdout.write(message + '\n') def reply_hex(message): # This is totally encrypted, right? sys.stdout.write(message.encode('hex') + '\n') def main(): global db reply = reply_plain datalen = struct.unpack('