forked from honeynet/apkinspector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ConfigurationDialog.py
125 lines (93 loc) · 3.36 KB
/
ConfigurationDialog.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# -*- coding: utf-8 -*-
"""
Module implementing ConfigurationDialog.
"""
from PyQt4.QtGui import QDialog
from PyQt4.QtCore import pyqtSignature
from Ui_ConfigurationDialog import Ui_ConfigurationDialog
class ConfigurationDialog(QDialog, Ui_ConfigurationDialog):
def __init__(self, parent = None):
"""
Constructor
"""
QDialog.__init__(self, parent)
self.setupUi(self)
import Global
if Global.CONFIG["CFG"] == 1:
self.checkBox_cfg.setChecked(1)
else:
self.checkBox_cfg.setChecked(0)
if Global.CONFIG["Dalvik"] == 1:
self.checkBox_dalvik.setChecked(1)
else:
self.checkBox_dalvik.setChecked(0)
if Global.CONFIG["Java"] == 1:
self.checkBox_javacode.setChecked(1)
else:
self.checkBox_javacode.setChecked(0)
if Global.CONFIG["Bytecode"] == 1:
self.checkBox_bytecode.setChecked(1)
else:
self.checkBox_bytecode.setChecked(0)
if Global.CONFIG["Smali"] == 1:
self.checkBox_smalicode.setChecked(1)
else:
self.checkBox_smalicode.setChecked(0)
if Global.CONFIG["CallIn"] == 1:
self.checkBox_callin.setChecked(1)
else:
self.checkBox_callin.setChecked(0)
if Global.CONFIG["CallOut"] == 1:
self.checkBox_callout.setChecked(1)
else:
self.checkBox_callout.setChecked(0)
if Global.CONFIG["Permission"] == 1:
self.checkBox_permission.setChecked(1)
else:
self.checkBox_permission.setChecked(0)
if Global.CONFIG["Manifest"] == 1:
self.checkBox_manifest.setChecked(1)
else:
self.checkBox_manifest.setChecked(0)
@pyqtSignature("bool")
def on_pushButton_ok_clicked(self, checked):
"""
Slot documentation goes here.
"""
import Global
if self.checkBox_cfg.isChecked():
Global.CONFIG["CFG"] = 1
else:
Global.CONFIG["CFG"] = 0
if self.checkBox_dalvik.isChecked():
Global.CONFIG["Dalvik"] = 1
else:
Global.CONFIG["Dalvik"] = 0
if self.checkBox_javacode.isChecked():
Global.CONFIG["Java"] = 1
else:
Global.CONFIG["Java"] = 0
if self.checkBox_bytecode.isChecked():
Global.CONFIG["Bytecode"] = 1
else:
Global.CONFIG["Bytecode"] = 0
if self.checkBox_smalicode.isChecked():
Global.CONFIG["Smali"] = 1
else:
Global.CONFIG["Smali"] = 0
if self.checkBox_callin.isChecked():
Global.CONFIG["CallIn"] = 1
else:
Global.CONFIG["CallIn"] = 0
if self.checkBox_callout.isChecked():
Global.CONFIG["CallOut"] = 1
else:
Global.CONFIG["CallOut"] = 0
if self.checkBox_permission.isChecked():
Global.CONFIG["Permission"] = 1
else:
Global.CONFIG["Permission"] = 0
if self.checkBox_manifest.isChecked():
Global.CONFIG["Manifest"] = 1
else:
Global.CONFIG["Manifest"] = 0