summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sploit/mem.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/sploit/mem.py b/sploit/mem.py
index 58c3d3d..e257c03 100644
--- a/sploit/mem.py
+++ b/sploit/mem.py
@@ -33,3 +33,11 @@ class Memmap:
for sym,addr in sorted(self.__tbl__.__dict__.items(),key=lambda x:x[1]):
s += tbl_format.format(hex(addr+self.base),sym)
return s
+
+def adjust(tbl, off):
+ tbl.__dict__ = {k:v+off for k,v in tbl.__dict__.items()}
+
+def rebase(tbl, sym):
+ off = -getattr(tbl, sym)
+ adjust(tbl, off)
+