m1n1/proxyclient/experiments/addrdump.py
Hector Martin d9561b7507 proxyclient: Big cleanup/move to module
All the common/importable stuff now lives in the 'm1n1' module.

General use tools are in tools/

Reverse engineering experiments are in experiments/

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-06-10 19:40:48 +09:00

28 lines
526 B
Python
Executable file

#!/usr/bin/env python3
# SPDX-License-Identifier: MIT
import sys, pathlib
sys.path.append(str(pathlib.Path(__file__).resolve().parents[1]))
from m1n1.setup import *
blacklist = []
print("Dumping address space...")
of = None
if len(sys.argv) > 1:
of = open(sys.argv[1],"w")
print("Also dumping to file %s")
for i in range(0x0000, 0x10000):
if i in blacklist:
v = "%08x: SKIPPED"%(i<<16)
else:
a = (i<<16) + 0x1000
d = p.read32(a)
v = "%08x: %08x"%(a, d)
print(v)
if of:
of.write(v+"\n")
if of:
of.close()