From 233f1701d357ca4e464371afd3ad399cd2ba0e48 Mon Sep 17 00:00:00 2001 From: ChenYe <51895486+Ch3nYe@users.noreply.github.com> Date: Wed, 31 Mar 2021 11:19:32 +0800 Subject: [PATCH] fix issue #40 This update can fix issue #40 on windows --- apkleaks/apkleaks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apkleaks/apkleaks.py b/apkleaks/apkleaks.py index 63d5107..48b9248 100644 --- a/apkleaks/apkleaks.py +++ b/apkleaks/apkleaks.py @@ -33,7 +33,7 @@ def __init__(self, args): self.output = tempfile.mkstemp(suffix=".%s" % ("json" if self.json else "txt"), prefix=self.prefix)[1] if args.output is None else args.output self.fileout = open(self.output, "%s" % ("w" if self.json else "a")) self.pattern = os.path.join(str(Path(self.main_dir).parent), "config", "regexes.json") if args.pattern is None else args.pattern - self.jadx = find_executable("jadx") if find_executable("jadx") is not None else os.path.join(str(Path(self.main_dir).parent), "jadx", "bin", "jadx%s" % (".bat" if os.name == "nt" else "")) + self.jadx = find_executable("jadx") if find_executable("jadx") is not None else os.path.join(str(Path(self.main_dir).parent), "jadx", "bin", "jadx%s" % (".bat" if os.name == "nt" else "")).replace("\\","/") self.out_json = {} self.scanned = False logging.config.dictConfig({"version": 1, "disable_existing_loggers": True}) @@ -94,6 +94,7 @@ def decompile(self): except Exception: pass comm = "%s" % (" ".join(quote(arg) for arg in args)) + comm = comm.replace("\'","\"") os.system(comm) def extract(self, name, matches):