mirror of
https://github.com/VoidSec/Exploit-Development
synced 2026-06-08 12:50:18 +00:00
6ac4750152
+ typos fixing + addr reference finder
18 lines
534 B
Python
18 lines
534 B
Python
import struct, re
|
|
|
|
f = open("stackpivot.txt", "r")
|
|
content = f.read()
|
|
f.close()
|
|
|
|
matches = re.findall(r"0x[0-9a-f]{8} :", content)
|
|
m=0
|
|
f = open("addr_2_search.txt", "w")
|
|
for match in matches:
|
|
m+=1
|
|
m_clean = match.replace(":","").replace("0x","").rstrip()
|
|
m_final=[]
|
|
for index in range(0, len(m_clean), 2):
|
|
m_final.append("\\x"+m_clean[index : index + 2])
|
|
m_final.reverse()
|
|
f.write("!mona find -s '"+"".join(m_final)+"' -cm aslr=false,rebase=false -cpb '\\x00\\x3b'\n")
|
|
print("Total addr: {}".format(m)) |