summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordusoleil <howcansocksbereal@gmail.com>2023-03-16 18:55:59 -0400
committerdusoleil <howcansocksbereal@gmail.com>2023-03-16 18:55:59 -0400
commit143f585b0e02ae87e0d383e27c48aa76745db51b (patch)
tree16df46de2f9c8b5eefe97ddde8b9f332bd489edb
parentd0aee78d96aade08c8e6180a4b8f067c947cf20a (diff)
downloadsploit-143f585b0e02ae87e0d383e27c48aa76745db51b.tar.gz
sploit-143f585b0e02ae87e0d383e27c48aa76745db51b.zip
elf: Automatically lookup Arch on ELF construction
Signed-off-by: dusoleil <howcansocksbereal@gmail.com>
-rw-r--r--sploit/rev/elf.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/sploit/rev/elf.py b/sploit/rev/elf.py
index e3c0a55..5833bf5 100644
--- a/sploit/rev/elf.py
+++ b/sploit/rev/elf.py
@@ -1,4 +1,5 @@
from sploit.rev import ldd, r2
+from sploit.arch import lookup_arch
from itertools import zip_longest
class ELF:
@@ -14,6 +15,7 @@ class ELF:
bininfo = r2.get_bin_info(self.path)
self.info = self.__BININFO__(bininfo)
self.security = self.__SECINFO__(bininfo)
+ self.arch = lookup_arch(self.info.arch_string, self.info.wordsize, self.info.endianness)
def __repr__(self):
s = 'ELF: '