remove more null bytes

This commit is contained in:
Jack Bond-Preston 2020-11-30 16:58:37 +00:00
parent ea9a78d8b9
commit b61a844605
3 changed files with 5 additions and 1 deletions

View File

@ -132,6 +132,9 @@ class ROPMakerX86(object):
if dataAddr % 2 == 0:
dataAddr += 1
dataAddrStr = f"{dataAddr:08x}".replace("00", "01")
dataAddr = int(dataAddrStr, 16)
print(f"dataAddr = 0x{dataAddr:08x}")
# prepend padding

View File

@ -113,3 +113,4 @@ if run:
print()
print(f"[ Run Program : ./{exec_file} {rop_file} ]")
os.execv(exec_file, [exec_file, rop_file])

View File

@ -1,2 +1,2 @@
null-data-addr: null-data-addr.c
gcc -fno-stack-protector -m32 -static $^ -o $@ -Tdata 0x080d9100
gcc -fno-stack-protector -m32 -static $^ -o $@ -Tdata 0x080f0000