diff options
author | Malfurious <m@lfurio.us> | 2024-05-19 18:05:15 -0400 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2024-05-19 18:05:15 -0400 |
commit | 4c5424e7325dbcaaf53177d83643400028655448 (patch) | |
tree | 576739e20e4f6819fd0443f3909466849ec9dca9 | |
parent | f4f37377df62b3a5d5685e23b261a534ef182006 (diff) | |
download | sploit-dev.tar.gz sploit-dev.zip |
-rw-r--r-- | sploit/rev/r2.py | 3 | ||||
-rw-r--r-- | sploit/util/cmd.py | 9 |
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(): |