Skip to content

Commit a966e78

Browse files
committed
Escapes decompiling arguments
1 parent 8577b7a commit a966e78

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: apkleaks/apkleaks.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from apkleaks.colors import clr
33
from contextlib import closing
44
from distutils.spawn import find_executable
5+
from pipes import quote
56
from pyaxmlparser import APK
67
from urllib.request import urlopen
78
from zipfile import ZipFile
@@ -84,8 +85,9 @@ def decompile(self):
8485
classes.write(zipped.read("classes.dex"))
8586
except Exception as e:
8687
sys.exit(self.writeln(str(e), clr.WARNING))
87-
dec = "%s %s -d %s --deobf" % (self.jadx, dex, self.tempdir)
88-
os.system(dec)
88+
args = [self.jadx, dex, "-d", self.tempdir, "--deobf"]
89+
comm = "%s" % (" ".join(quote(arg) for arg in args))
90+
os.system(comm)
8991
return self.tempdir
9092

9193
def unique(self, list):

0 commit comments

Comments
 (0)