-
Notifications
You must be signed in to change notification settings - Fork 238
/
MyThread.py
44 lines (36 loc) · 1.39 KB
/
MyThread.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
from PyQt4.QtGui import *
from PyQt4.QtCore import *
import Global
import JAD
import APKtool
from APKInfo import *
class MyThread(QThread):
progress = None
filename = None
def __init__(self,progress, filename):
super(MyThread, self).__init__()
self.progress = progress
self.filename = filename
def run(self):
Global.APK = APK(self.filename)
if not Global.APK.isVaildAPK():
self.progress.step = 599900
else:
Global.VM = DalvikVMFormat(Global.APK.getDex())
Global.VMX = analysis.VMAnalysis(Global.VM)
if self.progress.step <= 500000:
self.progress.step = 500000
if Global.CONFIG["Java"] == 1:
print "set JAD flag"
Global.FLAG_JAD = 0
Global.FLAG_JAD=JAD.decompile(self.filename)
if self.progress.step <= 800000:
self.progress.step = 800000
# print "java" Global.CONFIG["Java"]
# print "smali" Global.CONFIG["Smali"]
if Global.CONFIG["Smali"] ==1 or Global.CONFIG["Manifest"] ==1:
print "start thread apktool1"
# Global.FLAG_APKTOOL = 0
Global.FLAG_APKTOOL = APKtool.callAPKtool(self.filename)
if self.progress.step <= 990000:
self.progress.step = 990000