summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/sploit/sploit/rev/__init__.py1
-rw-r--r--tools/sploit/sploit/rev/elf.py22
2 files changed, 23 insertions, 0 deletions
diff --git a/tools/sploit/sploit/rev/__init__.py b/tools/sploit/sploit/rev/__init__.py
index b6a73a2..43cee7b 100644
--- a/tools/sploit/sploit/rev/__init__.py
+++ b/tools/sploit/sploit/rev/__init__.py
@@ -1,5 +1,6 @@
from . import (
ldd,
r2,
+ elf,
)
diff --git a/tools/sploit/sploit/rev/elf.py b/tools/sploit/sploit/rev/elf.py
new file mode 100644
index 0000000..a748f10
--- /dev/null
+++ b/tools/sploit/sploit/rev/elf.py
@@ -0,0 +1,22 @@
+from sploit.rev import ldd, r2
+
+class ELF:
+ def __init__(self, path):
+ self.path = path
+ self.sym = r2.get_elf_symbols(self.path)
+ libs = ldd.get_libraries(self.path)
+ self.libs = {lib.name:ELF(lib.path) for lib in libs.values() if lib.path}
+
+ def __str__(self):
+ s = 'ELF: '
+ s += self.path
+ s += '\nSymbol Table'
+ s += '\n------------'
+ s += '\n'
+ s += str(self.sym)
+ s += '\n------------'
+ s += '\nLibararies'
+ s += '\n------------'
+ for name,lib in self.libs.items():
+ s += '\n' + str(name) + ' => ' + str(lib.path)
+ return s