diff options
author | dusoleil <howcansocksbereal@gmail.com> | 2022-03-12 19:18:28 -0500 |
---|---|---|
committer | dusoleil <howcansocksbereal@gmail.com> | 2022-03-13 23:27:30 -0400 |
commit | 509a8cfcadcca94d336fe08be897f62a721079d2 (patch) | |
tree | 0b729aaf72aebfd9d57deea07192e82fc225ad9b /sploit/rev/elf.py | |
parent | fc1c413bc6b0054cc9c079dbdd2e74eefd75557a (diff) | |
download | nsploit-509a8cfcadcca94d336fe08be897f62a721079d2.tar.gz nsploit-509a8cfcadcca94d336fe08be897f62a721079d2.zip |
sploit: cache results of external commands
rather than cacheing ELF instantiations, just cache the results of
external commands
Signed-off-by: dusoleil <howcansocksbereal@gmail.com>
Diffstat (limited to 'sploit/rev/elf.py')
-rw-r--r-- | sploit/rev/elf.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/sploit/rev/elf.py b/sploit/rev/elf.py index d9edd40..1957c15 100644 --- a/sploit/rev/elf.py +++ b/sploit/rev/elf.py @@ -1,16 +1,6 @@ from sploit.rev import ldd, r2 -__ELF_CACHE__ = {} - -def ELF(path): - if path in __ELF_CACHE__: - return __ELF_CACHE__[path] - else: - elf = __ELF__(path) - __ELF_CACHE__[path] = elf - return elf - -class __ELF__: +class ELF: def __init__(self, path): self.path = path self.sym = r2.get_elf_symbols(self.path) |