-
Notifications
You must be signed in to change notification settings - Fork 51
/
main.py
177 lines (165 loc) · 7.5 KB
/
main.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
import os
import argparse
from pyfiglet import Figlet
from subprocess import run
from rich.console import Console
from rich.pretty import pprint
from rich.prompt import Prompt
from rich.table import Table
from config.installer import installer
from config.androp import androp
from config.apkleaks import apkleaks
from config.mobfs import mobfs
from config.rms import rms
from config.additional import addins
from config.apkeditor import apkeditor
from config.update import update_addins
from config.backdoor import backdoor
console = Console()
os.chdir(os.getcwd())
path = str(os.getcwd())
fn = ""
parser = argparse.ArgumentParser(
description='QuadraInspect a APK analysis framework..')
parser.add_argument('--target', metavar='target', type=str,
help='APK FILE NAME', required=False)
parser.add_argument('--mode', metavar='mode', type=str,
help='Mode of the framework. (frame / argm)', required=False, default='frame')
parser.add_argument('--command', metavar='command', type=str,
help='Type of scan you want to continue', required=False)
args = parser.parse_args()
target = args.target
command = args.command
mode = args.mode
def banner():
f = Figlet(font='slant')
console.print(f.renderText('QuadraInspect'), style="bold")
pass
def main():
fn = target
banner()
rdir = os.getcwd()
match mode:
case 'frame':
try:
while True:
cmd = Prompt.ask("QuadraInspect Main>> ")
match cmd:
case 'SET target':
fn = Prompt.ask("Name >>")
case 'LIST tools_name':
table = Table(title="Tools Intigrated")
table.add_column("Number")
table.add_column("Name")
table.add_row("1", "apkleaks")
table.add_row("2", "mobfs")
table.add_row("3", "andropass")
table.add_row("4", "RMS")
console.print(table)
case 'START install_tools':
installer(rdir)
case 'START apkleaks':
apkleaks(fn, rdir)
case 'START mobfs':
mobfs(rdir)
case 'START rms':
rms(rdir)
case 'START andropass':
androp(fn, rdir)
case 'START backdoor':
backdoor(fn, rdir)
case 'START apkeditor':
apkeditor(fn, rdir)
case 'SHOW banner':
banner()
case 'START addins':
addins(rdir)
case 'update addins':
update_addins(rdir)
case 'help':
hm = Table(title="Main Help Menu")
hm.add_column("Command")
hm.add_column("Details")
hm.add_row(
"SET target", "SET the name of the targetfile")
hm.add_row("START install_tools",
"If not installed this will install the tools")
hm.add_row("LIST tools_name",
"List out the Tools Intigrated")
hm.add_row("START apkleaks", "Use APKLeaks tool")
hm.add_row("START andropass",
"Use AndroPass APK analizer")
hm.add_row(
"START backdoor", "Create an obfescated APK file for payload injection")
hm.add_row("START mobfs",
"Use MOBfs for dynamic and static analysis")
hm.add_row("START rms",
"Use rms for static analysis")
hm.add_row("START apkeditor",
"APK decompilation and analysis tool")
hm.add_row("START addins", "Install Extra tools.")
hm.add_row("help", "View this current Help menu")
hm.add_row("SHOW banner", "Render Banner")
hm.add_row("quit", "Quit the Program")
console.print(hm)
case 'quit':
pprint("Happy hacking..")
quit()
except KeyboardInterrupt:
pprint("I am Quiting!")
quit()
case 'argm':
try:
match command:
case 'tools_name':
table = Table(title="Tools Intigrated")
table.add_column("Number")
table.add_column("Name")
table.add_row("1", "apkleaks")
table.add_row("2", "mobfs")
table.add_row("3", "andropass")
table.add_row("4", "RMS")
console.print(table)
case 'install_tools':
installer(rdir)
case 'apkleaks':
apkleaks(fn, rdir)
case 'mobfs':
mobfs(rdir)
case 'rms':
rms(rdir)
case 'andropass':
androp(fn, rdir)
case 'banner':
banner()
case 'backdoor':
backdoor(fn, rdir)
case 'addins':
addins(rdir)
case 'update-addins':
update_addins(rdir)
case 'help':
hm = Table(title="Main Help Menu")
hm.add_column("Command")
hm.add_column("Details")
hm.add_row("install_tools",
"If not installed this will install the tools")
hm.add_row("tools_name",
"List out the Tools Intigrated")
hm.add_row("apkleaks", "Use APKLeaks tool")
hm.add_row("andropass",
"Use AndroPass APK analizer")
hm.add_row(
"backdoor", "Create an obfescated APK file for payload injection")
hm.add_row("mobfs",
"Use MOBfs for dynamic and static analysis")
hm.add_row("rms",
"Use rms for static analysis")
hm.add_row("addins", "Add aditional tools")
hm.add_row("help", "View this current Help menu")
console.print(hm)
except KeyboardInterrupt:
pprint("I am Quiting!")
quit()
if __name__ == "__main__":
main()