-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathptoolkit.py
220 lines (184 loc) · 7.45 KB
/
ptoolkit.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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
#Written By: Foong Yew Joe (TP054538)
#Description: As main program, show categories menu and main menu
#First Written Date: 7 February 2022
#Last Edited: 18 April 2022
import os
import PackageCheck
import PackageInstall
import PackageUpdate
import PackageUninstall
from module import *
def prRed(printinput):
print("\033[91m{}\033[00m".format(printinput))
def RoE():
print("|----------------------------------------------------------------|")
print("|----------------------------------------------------------------|")
print("| RULES OF ENGAGEMENT |")
print("|Please note that this toolkit is intended for learning purpose|")
print("|only. Do not use this toolkit on unauthorised target. The author|")
print("|will not be responsible for any action performed by the user. |")
print("|Users will be responsible for their action carried out. Improper|")
print("|usage of this tools might be illegal and authorities might take |")
print("|legal actions against the user. Please use this tools at your |")
print("|own risk! |")
print("| |")
print("|****Please enter \"yes\" if you agree with the statement above****|")
print("|----------------------------------------------------------------|")
print("|----------------------------------------------------------------|")
print(" ")
print(" ")
print("**Some content might be hidden if the background colour of the terminal is plain white colour.")
Answer = input("Answer: ")
if Answer == "yes" or Answer == "YES" or Answer == "Yes":
return 1
else:
return 0
def banner():
prRed("""
-------------------------
------------------------------------------------
--------------------------------------------------------------------
_______ ________ __ __ _
| _ \ | | | | | | /\ | |
| / \ \ |________| | | | | ___ \/ __| |__
| | | | | | ___ ___ | | | | / / __ |__ __|
| \_/ / | | / _ \ / _ \ | | | |/ / | | | |
| ____/ | | | / \ | | / \ | | | | \ | | | |
| | | | | \_/ | | \_/ | | | | |\ \ | | | |
|__| |__| \_____/ \_____/ |__| |__| \__\ |__| |_|
--------------------------------------------------------------------
------------------------------------------------
\033[32mCreated by: \033[1;32mYew Joe\033[0;31m -------------------------\033[1;32m APU-FYP
""")
print("\033[1;33mVersion: 3.0 ", end='')
if tor.check_init() == 1:
PackageCheck.prGreen("Tor is running on \033[1;33msocks5://127.0.0.1:9050")
else:
print(" \033[0;33mTor is not running\033[00m", end='')
def main_menu():
print("""
Main Menu
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1. Install Tools 5. Reconnaissance 10. Exit
2. Update Tools 6. Scanning
3. Uninstall Tools 7. Exploitation
4. Tor Proxy 8. Maintaining Access
""")
def recon_menu():
recon_input = ""
while recon_input != "99":
os.system("clear")
print("""
Reconnaissance Menu
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1. Vulnerability Search (Searchsploit) 2. OSINT/Recon (Sn1per)
99. Exit
""")
recon_input = input("Select: ").strip()
if recon_input == "1":
searchsploit.main()
elif recon_input == "2":
sniper.main()
def scanning_menu():
scanning_input = ""
while scanning_input != "99":
os.system("clear")
print("""
Scanning Menu
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1. Port Scan (Nmap) 2. Web/Vuln Scan (Sn1per)
3. Wordpress Scanner (Wpscan) 4. Joomla scanner(JoomScan)
5. Nikto 6. Host Discovery (Nmap)
99. Exit
""")
scanning_input = input("Select: ").strip()
if scanning_input == "1":
nmap.main()
elif scanning_input == "2":
sniper_scan.main()
elif scanning_input == "3":
wpscan.main()
elif scanning_input == "4":
joomla.main()
elif scanning_input == "5":
nikto.main()
elif scanning_input == "6":
host_nmap.main()
def exploitation_menu():
exploitation_select = ""
while exploitation_select != "99":
os.system("clear")
print("""
Exploitation Menu
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1. SQL injection (SQLmap) 2. Directory and Files Discovery (GoBuster)
3. Login Cracker (Hydra) 4. Password Cracker (JohnTheRipper)
5. MITM (Ettercap) 6. Social Engineering Toolkit (SET)
7. Denial-of-Service (Slowloris)
99. Exit
""")
exploitation_select = input("\nSelect: ").strip()
if exploitation_select == "1":
sqlmap.main()
elif exploitation_select == "2":
gobuster.main()
elif exploitation_select == "3":
hydra.main()
elif exploitation_select == "4":
john.main()
elif exploitation_select == "5":
ettercap.main()
elif exploitation_select == "6":
set.main()
elif exploitation_select == "7":
slowloris.main()
def maintaining_menu():
maintaining_select = ""
while maintaining_select != "99":
os.system("clear")
print("""
Maintaining Access Menu
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1. Payload generator with encoder (MSFvenom)
99. Exit
""")
maintaining_select = input("Select: ").strip()
if maintaining_select == "1":
msfvenom.main()
#main program
if __name__ == '__main__':
if RoE() == 1:
selection = 0
while(selection != 10):
selection = 0 #initialize selection so it wont inherit from other module
os.system('clear')
banner()
main_menu()
try:
selection = int(input("Selection: "))
except ValueError:
pass
if selection == 1:
PackageInstall.main()
elif selection == 2:
PackageUpdate.main()
elif selection == 3:
PackageUninstall.main()
elif selection == 4:
tor.main()
elif selection == 5:
recon_menu()
elif selection == 6:
scanning_menu()
elif selection == 7:
exploitation_menu()
elif selection == 8:
maintaining_menu()
#exit shut down tor
if tor.check_init() == 1:
os.system("sudo service tor stop")
print("Exiting...")
exit()
else:
print("Exiting.............")
exit()