From 4bf40b9d27dbb471b7b18be502deacfb12540120 Mon Sep 17 00:00:00 2001 From: dusoleil Date: Sun, 13 Mar 2022 04:33:58 -0400 Subject: sploit: add stack base pointer to locals symtbl Signed-off-by: dusoleil --- tools/sploit/sploit/rev/r2.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/sploit/sploit/rev/r2.py b/tools/sploit/sploit/rev/r2.py index 97eeadd..bb3edb3 100644 --- a/tools/sploit/sploit/rev/r2.py +++ b/tools/sploit/sploit/rev/r2.py @@ -49,7 +49,9 @@ 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} - return Symtbl(**out) + out = Symtbl(**out) + out.sbp = 0 + return out def ret_gadget(binary): ilog(f'Searching for a ret gadget in {binary} with r2...') -- cgit v1.2.3