#!/usr/bin/env python3 import subprocess, os, glob, sys, time, struct RPP = "/home/m/soothe-bt/render_long.rpp" proc = subprocess.Popen( ['reaper', '-nosplash', '-renderproject', RPP], stdout=open('/tmp/rtall.log', 'w'), stderr=subprocess.STDOUT) print('reaper', proc.pid, flush=True) start, end = 0x1824abb00, 0x1824abd00 # vtbl region SLOTS = list(range(start, end, 8)) def find_hosts(): out = [] for p in glob.glob('/proc/[0-9]*'): try: pid = int(os.path.basename(p)) m = open(f'/proc/{pid}/maps').read() c = open(f'/proc/{pid}/cmdline', 'rb').read().decode('utf8', 'replace') if 'soothe2' in m and 'yabridge-host.exe' in c: out.append(pid) except Exception: pass return out def scan_all(pid): mem = os.open(f'/proc/{pid}/mem', os.O_RDONLY) resc = {s: [] for s in SLOTS} maps = open(f'/proc/{pid}/maps').read() for line in maps.splitlines(): p = line.split() lo, hi = (int(x, 16) for x in p[0].split('-')) if 'r' not in p[1]: continue try: d = os.pread(mem, hi - lo, lo) except Exception: continue for s in SLOTS: t = struct.pack('