From 509a8cfcadcca94d336fe08be897f62a721079d2 Mon Sep 17 00:00:00 2001 From: dusoleil Date: Sat, 12 Mar 2022 19:18:28 -0500 Subject: sploit: cache results of external commands rather than cacheing ELF instantiations, just cache the results of external commands Signed-off-by: dusoleil --- sploit/rev/r2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sploit/rev/r2.py') diff --git a/sploit/rev/r2.py b/sploit/rev/r2.py index af0fe24..c7a8a65 100644 --- a/sploit/rev/r2.py +++ b/sploit/rev/r2.py @@ -1,12 +1,12 @@ from sploit.mem import Symtbl from sploit.arch import arch +from sploit.util import run_cmd_cached import re -from subprocess import run from collections import namedtuple as nt def run_cmd(binary,cmd): - return run(['r2','-q','-c',cmd,'-e','scr.color=false',binary],capture_output=True).stdout.decode('utf-8').split('\n')[:-1] + return run_cmd_cached(['r2','-q','-c',cmd,'-e','scr.color=false',binary]) def get_elf_symbols(elf): out = {} -- cgit v1.2.3