diff options
-rw-r--r-- | tools/sploit/sploit/mem.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/sploit/sploit/mem.py b/tools/sploit/sploit/mem.py index 58c3d3d..e257c03 100644 --- a/tools/sploit/sploit/mem.py +++ b/tools/sploit/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) + |