24hh-2: runtime dispatch tables STABLE (=static); bigkernels resolve to IMPORTS (outside dump); iat_name.py PE-export parser drafted (needs SIGSTOP race fix); once named, full cascade simulator becomes implementable
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env python3
|
||||
import struct, subprocess, time, os, glob
|
||||
def find_host():
|
||||
for p in glob.glob('/proc/[0-9]*'):
|
||||
pid=int(os.path.basename(p))
|
||||
try:
|
||||
cmd=open('/proc/%d/cmdline'%pid,'rb').read().replace(b'\0',b' ').decode('utf8','replace')
|
||||
maps=open('/proc/%d/maps'%pid).read()
|
||||
except Exception: continue
|
||||
if 'soothe2' in maps and 'reaper' not in cmd: return pid
|
||||
return None
|
||||
subprocess.run("pkill -9 -x reaper; pkill -9 -f '[y]abridge'; sleep 1; "
|
||||
"rm -rf /run/user/1000/yabridge-soothe2_x64-*", shell=True)
|
||||
proc=subprocess.Popen(['/usr/bin/reaper','-nosplash','-ignoreerrors','-renderproject','/tmp/opencode/multi.rpp'],
|
||||
stdout=subprocess.DEVNULL,stderr=subprocess.STDOUT)
|
||||
t0=time.time();host=None
|
||||
while time.time()-t0<30 and not host: host=find_host();time.sleep(0.002)
|
||||
print('host',host)
|
||||
fd=os.open('/proc/%d/mem'%host,os.O_RDONLY)
|
||||
for addr,nm in ((0x1824ac210,'vtbl'),(0x182617508,'bk-table'),(0x180140ad0,'stub-code'),(0x180533340,'iir-gen')):
|
||||
try:
|
||||
b=os.pread(fd,16,addr)
|
||||
print('%-10s %x OK: %s' % (nm,addr,b[:8].hex()))
|
||||
except OSError as e:
|
||||
print('%-10s %x FAIL: %s' % (nm,addr,e))
|
||||
Reference in New Issue
Block a user