summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2023-02-22 15:01:24 -0500
committerdusoleil <howcansocksbereal@gmail.com>2023-02-24 03:39:09 -0500
commite3fcc7bf6450bf985291a4d8dd62eb2c08a83245 (patch)
treee0c4376e699ad9f34d0b7a9334516b5997489bd8
parentd49577bdb3cd352fcbdab26391711ccbfcca82ec (diff)
downloadsploit-0.2.tar.gz
sploit-0.2.zip
r2: Simplify Symtbl construction in get_locals()v0.2
Signed-off-by: Malfurious <m@lfurio.us> Signed-off-by: dusoleil <howcansocksbereal@gmail.com>
-rw-r--r--sploit/rev/r2.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/sploit/rev/r2.py b/sploit/rev/r2.py
index 5f7632a..7fe57d8 100644
--- a/sploit/rev/r2.py
+++ b/sploit/rev/r2.py
@@ -54,9 +54,7 @@ def get_locals(binary,func):
out = run_cmd(binary,cmd_locals)
out = [re.split(r':?\s+',var) for var in out]
out = {var[1]:-(int(var[0],0)-arch.wordsize) for var in out}
- out = Symtbl(**out)
- out.sbp = 0
- return out
+ return Symtbl(sbp=0, **out)
def ret_gadget(binary):
ilog(f'Searching for a ret gadget in {binary} with r2...')