2021-02-05 09:30:43 +00:00
|
|
|
#!/usr/bin/env python3
|
2021-06-10 10:40:48 +00:00
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
import sys, pathlib
|
|
|
|
sys.path.append(str(pathlib.Path(__file__).resolve().parents[1]))
|
2021-01-15 04:04:01 +00:00
|
|
|
|
2021-06-10 10:40:48 +00:00
|
|
|
from m1n1.setup import *
|
2021-01-15 04:04:01 +00:00
|
|
|
|
|
|
|
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
|
2021-06-10 10:40:48 +00:00
|
|
|
d = p.read32(a)
|
2021-01-15 04:04:01 +00:00
|
|
|
v = "%08x: %08x"%(a, d)
|
|
|
|
print(v)
|
|
|
|
if of:
|
|
|
|
of.write(v+"\n")
|
|
|
|
|
|
|
|
if of:
|
|
|
|
of.close()
|