Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions qark/decompiler/decompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
6 changes: 3 additions & 3 deletions qark/decompiler/external_decompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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):
Expand All @@ -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())
3 changes: 2 additions & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down