diff options
-rw-r--r-- | sploit/rev/elf.py | 5 | ||||
-rw-r--r-- | sploit/symtbl.py | 6 |
2 files changed, 4 insertions, 7 deletions
diff --git a/sploit/rev/elf.py b/sploit/rev/elf.py index e099819..a009e97 100644 --- a/sploit/rev/elf.py +++ b/sploit/rev/elf.py @@ -8,9 +8,10 @@ class ELF: self.libs = self.__LIBS__(libs) self.locals = self.__LOCALS__(self) - def __str__(self): + def __repr__(self): s = 'ELF: ' s += self.path + s += '\n------------' s += '\nSymbol Table' s += '\n------------' s += '\n' @@ -28,7 +29,7 @@ class ELF: get = super().__getitem__ if(type(get(lib))==str):self[lib] = ELF(get(lib)) return get(lib) - def __str__(self): + def __repr__(self): s = '' for name,lib in self.items(): s += '\n' + str(name) + ' => ' + lib if(type(lib)==str) else str(lib.path) diff --git a/sploit/symtbl.py b/sploit/symtbl.py index 05021f7..aa6fc69 100644 --- a/sploit/symtbl.py +++ b/sploit/symtbl.py @@ -170,11 +170,7 @@ class SymtblImpl: return symbol in self.__entries__ def __repr__(self): - """Return string representation of Symtbl""" - return str(self) - - def __str__(self): - """Return string representation of Symtbl""" + """Return human-readable Symtbl""" FMT = "\n{:<20} {:<20}" s = f"{len(self)} symbols @ {hex(self)}" s += FMT.format("ADDRESS", "SYMBOL") |