summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sploit/rev/r2.py3
-rw-r--r--sploit/util/cmd.py9
2 files changed, 2 insertions, 10 deletions
diff --git a/sploit/rev/r2.py b/sploit/rev/r2.py
index e81adc9..69445ac 100644
--- a/sploit/rev/r2.py
+++ b/sploit/rev/r2.py
@@ -74,7 +74,6 @@ def rop_json(binary):
# ]
return json.loads("\n".join(run_cmd(binary, "/Rj")))
-@cache
def rop_gadgets(binary, *regexes, cont=False):
ilog(f"Searching {binary} for {'; '.join(regexes)} gadgets with r2...")
gadgets = rop_json(binary)
@@ -116,7 +115,6 @@ def rop_gadget(binary, *regexes):
raise LookupError(f"Could not find gadget for: {'; '.join(regexes)}")
return results[0]
-@cache
def get_call_returns(binary,xref_from,xref_to):
ilog(f'Getting return addresses of calls from {hex(xref_from)} to {hex(xref_to)} in {binary} with r2...')
@@ -132,7 +130,6 @@ def get_call_returns(binary,xref_from,xref_to):
rets.append(CallRet(xref_from,xref_to,int(x[0],0),int(ret[0],0)))
return rets
-@cache
def get_bin_info(binary):
ilog(f'Retrieving binary and security info about {binary} with r2...')
diff --git a/sploit/util/cmd.py b/sploit/util/cmd.py
index ac1d428..db56607 100644
--- a/sploit/util/cmd.py
+++ b/sploit/util/cmd.py
@@ -6,13 +6,8 @@ def run_cmd(cmd,cwd=None):
__RUN_CACHE__ = {}
def run_cmd_cached(cmd,cwd=None):
- key = ''.join(cmd)
- if key in __RUN_CACHE__:
- return __RUN_CACHE__[key]
- else:
- result = run_cmd(cmd,cwd)
- __RUN_CACHE__[key] = result
- return result
+ result = run_cmd(cmd,cwd)
+ return result
#try to get the version through git
def git_version():