diff options
Diffstat (limited to '')
-rw-r--r-- | sploit/mem.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sploit/mem.py b/sploit/mem.py new file mode 100644 index 0000000..6de32f8 --- /dev/null +++ b/sploit/mem.py @@ -0,0 +1,15 @@ +class Symtbl: + def __init__(self, base=0, **kwargs): + self.__dict__ = {'base' : base, **kwargs} + + def __getattribute__(self, sym): + a = object.__getattribute__(self, sym) + if sym in object.__getattribute__(self,'__dict__') and sym != 'base': + return self.base + a + else: + return a + + def addr(self, sym, addr): + if sym == 'base' : self.base = addr + else: self.base = addr - object.__getattribute__(self, sym) + |