From 84e9071a8bd4a9e60a83ef7e3b615bfe2f9c4f21 Mon Sep 17 00:00:00 2001 From: vin01 Date: Fri, 9 Aug 2019 09:58:32 +0200 Subject: [PATCH 1/2] fix: handle whitespaces in paths --- qark/decompiler/decompiler.py | 6 +++--- qark/decompiler/external_decompiler.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/qark/decompiler/decompiler.py b/qark/decompiler/decompiler.py index 216362c2..fdf5629a 100644 --- a/qark/decompiler/decompiler.py +++ b/qark/decompiler/decompiler.py @@ -26,9 +26,9 @@ DECOMPILERS_PATH = os.path.join(LIB_PATH, "decompilers") -APK_TOOL_COMMAND = ("java -Djava.awt.headless=true -jar {apktool_path}/apktool.jar " - "d {path_to_source} --no-src --force -m --output {build_directory}") -DEX2JAR_COMMAND = "{dex2jar_path} {path_to_dex} -o {build_apk}.jar" +APK_TOOL_COMMAND = ("java -Djava.awt.headless=true -jar '{apktool_path}/apktool.jar' " + "d '{path_to_source}' --no-src --force -m --output '{build_directory}'") +DEX2JAR_COMMAND = "'{dex2jar_path}' '{path_to_dex}' -o '{build_apk}.jar'" def escape_windows_path(path): diff --git a/qark/decompiler/external_decompiler.py b/qark/decompiler/external_decompiler.py index 47d6a27f..984d42a4 100644 --- a/qark/decompiler/external_decompiler.py +++ b/qark/decompiler/external_decompiler.py @@ -19,7 +19,7 @@ def __init__(self): ExternalDecompiler.__init__(self, name="cfr", path_to_decompiler=os.path.join(PATH_TO_DECOMPILERS, "cfr_0_124.jar"), - command="java -jar {path_to_decompiler} {jar} --outputdir {build_directory}/cfr") + command="java -jar '{path_to_decompiler}' '{jar}' --outputdir '{build_directory}/cfr'") class Procyon(ExternalDecompiler): @@ -28,7 +28,7 @@ def __init__(self): name="procyon", path_to_decompiler=os.path.join(PATH_TO_DECOMPILERS, "procyon-decompiler-1.0.jar"), - command="java -jar {path_to_decompiler} {jar} -o {build_directory}/procyon") + command="java -jar '{path_to_decompiler}' '{jar}' -o '{build_directory}/procyon'") class Fernflower(ExternalDecompiler): @@ -37,7 +37,7 @@ def __init__(self): name="fernflower", path_to_decompiler=os.path.join(PATH_TO_DECOMPILERS, "fernflower.jar"), - command="java -jar {path_to_decompiler} -ren=1 {jar} {build_directory}/fernflower") + command="java -jar '{path_to_decompiler}' -ren=1 '{jar}' '{build_directory}/fernflower'") DECOMPILERS = (CFR(), Procyon(), Fernflower()) From f993e83a71911df39ce43084da6cd2cda7e35474 Mon Sep 17 00:00:00 2001 From: vin01 Date: Fri, 9 Aug 2019 16:03:45 +0200 Subject: [PATCH 2/2] fix: update pip hash for pluggy --- requirements-test.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements-test.txt b/requirements-test.txt index 449eea6f..f5463f87 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -77,7 +77,8 @@ mccabe==0.6.1 \ --hash=sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f \ # via flake8 pluggy==0.6.0 \ - --hash=sha256:7f8ae7f5bdf75671a718d2daf0a64b7885f74510bcd98b1a0bb420eb9a9d0cff \ + --hash=sha256:d345c8fe681115900d6da8d048ba67c25df42973bda370783cd58826442dcd7c \ + --hash=sha256:e160a7fcf25762bb60efc7e171d4497ff1d8d2d75a3d0df7a21b76821ecbf5c5 \ # via pytest pluginbase==0.5 \ --hash=sha256:b4f830242a078a4f44c978a84f3365bba4d008fdd71a591c71447f4df35354dd