diff options
author | Malfurious <m@lfurio.us> | 2022-03-14 00:43:15 -0400 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2022-03-14 00:43:15 -0400 |
commit | 616c8b8eadbde6fbb2fe16a6a2167e04f9d16382 (patch) | |
tree | 6560d8b5fea2b40d041f52683cd7accc61ce67a5 /sploit/mem.py | |
parent | dcba5f2b3d13f5142e4e552bdd717286f953bf1a (diff) | |
parent | c493a8f8073702bcdccdbc40bf09931e201c9013 (diff) | |
download | nsploit-616c8b8eadbde6fbb2fe16a6a2167e04f9d16382.tar.gz nsploit-616c8b8eadbde6fbb2fe16a6a2167e04f9d16382.zip |
Merge tag 'pull-sploit-rev' of https://github.com/Dusoleil/lib-des-gnux
Add rev for basic reverse engineering
* tag 'pull-sploit-rev' of https://github.com/Dusoleil/lib-des-gnux:
sploit: Move __attr_filter__ to a general place in util
sploit: Filter all magic python members by default in mem module
sploit: add stack base pointer to locals symtbl
sploit: print hex of addresses in rev logs
sploit: add status logging to rev module
sploit: lazy load libs for ELF
sploit: cache results of external commands
sploit: add the rest of r2 functions through elf
sploit: typo fix in rev.r2
sploit: cache ELF loads
sploit: add ELF helper class to rev
sploit: consolidate r2 symbol search calls
sploit: fix r2 module syntax error
sploit: reverse direction of r2 get_locals offsets
sploit: add r2 funcionality to rev module
sploit: add ldd ability to rev module
sploit: add rev module to sploit
Diffstat (limited to 'sploit/mem.py')
-rw-r--r-- | sploit/mem.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sploit/mem.py b/sploit/mem.py index 3ad0c50..ac2bbb1 100644 --- a/sploit/mem.py +++ b/sploit/mem.py @@ -1,3 +1,5 @@ +from sploit.util import __attr_filter__ + class Symtbl: __subs__ = {} def __init__(self, **kwargs): @@ -12,7 +14,7 @@ class Symtbl: self.off = off self.tbl = tbl def __getattribute__(self,sym): - if(sym in ['off','tbl','__class__']): + if(sym in (['off','tbl'] + __attr_filter__)): return object.__getattribute__(self,sym) addr = getattr(self.tbl,sym) if(type(addr)==int): @@ -30,7 +32,8 @@ class Symtbl: def __getattribute__(self, sym): addr = object.__getattribute__(self,sym) - if(sym == '__subs__'):return addr + if(sym in (['__subs__'] + __attr_filter__)): + return addr if(sym == 'base'):return 0 if(sym in self.__subs__): return self.__InnerTable__(addr,self.__subs__[sym]) @@ -51,7 +54,7 @@ class Memmap: self.base = addr - sym def __getattribute__(self, sym): - if(sym in ['__tbl__','base']): + if(sym in (['__tbl__','base'] + __attr_filter__)): return object.__getattribute__(self, sym) addr = getattr(self.__tbl__, sym) if(type(addr)==Symtbl.__InnerTable__): |