-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathh4mtool.py
More file actions
240 lines (225 loc) · 11.3 KB
/
h4mtool.py
File metadata and controls
240 lines (225 loc) · 11.3 KB
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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
#All Rights reserved to https://github.com/SuccessCod3
#if you found some bug/error please report it in my discord <3
#https://discord.gg/BaStk83sPu
import os
import colorama
import platform
from colorama import Fore
systemdet = platform.system()
errormsg = "Something is wrong!, if you think it is a error please report it on discord"
title = Fore.RED+"""
888 888 d8888 888b d888 88888888888 888
888 888 d8P888 8888b d8888 888 888
888 888 d8P 888 88888b.d88888 888 888
8888888888 d8P 888 888Y88888P888 888 .d88b. .d88b. 888
888 888 d88 888 888 Y888P 888 888 d88""88b d88""88b 888
888 888 8888888888 888 Y8P 888 888 888 888 888 888 888
888 888 888 888 " 888 888 Y88..88P Y88..88P 888
888 888 888 888 888 888 "Y88P" "Y88P" 888"""
menu = Fore.WHITE+"""
╔═════════════════════════════════════════════╦═══════════════════════════════════════════════════╗
║ Executor ║ Function ║
║ ║ ║
║═════════════════════════════════════════════║═══════════════════════════════════════════════════║
║ scan (nmap scan) ║ use nmap to scan a port ip/range ║
║ qubo (just for minecraft ports) ║ use qubo scanner to scan ip/range (mc ports) ║
║ subdomains (Avaible in v1.x) ║ scan a subdomain list in a domain ║
║ poisoning (Avaible in v1.x) ║ Create a proxy connection that redirects to a ║
║ ║ server and captures commands ║
║ clear ║ Clear screen ║
╚═════════════════════════════════════════════╩═══════════════════════════════════════════════════╝
https://es.namemc.com/ipforwarding
https://github.com/SuccessCod3 """
menuscan = Fore.WHITE+"""
╔═════════════════════════════════════════════╦═══════════════════════════════════════════════════╗
║ Executor ║ Function ║
║ ║ ║
║═════════════════════════════════════════════║═══════════════════════════════════════════════════║
║ fast: (1-100,25565-25600) ║ Fast scan - ranges/ip ║
║ medium: (1-10000,25000-30000) ║ medium scan - not recommended for ranges ║
║ slow: (1-65535) ║ slow scan - not recommended for ranges ║
║ custom ║ custom scan - you select port range ║
║ ║ ║
║ clear ║ Clear screen ║
╚═════════════════════════════════════════════╩═══════════════════════════════════════════════════╝
https://es.namemc.com/ipforwarding
https://github.com/SuccessCod3 """
def clear():
if systemdet=="Linux":
os.system("clear")
else:
os.system("cls")
def main():
if systemdet=="Linux":
os.system("clear")
else:
os.system("cls")
print(title)
print(menu)
cmd = input('Select your option: ')
if cmd=="scan":
clear()
scan()
pass
elif cmd=="qubo":
clear()
qubo()
pass
elif cmd=="clear":
clear()
print(menu)
pass
else:
main()
pass
def scan():
print(title)
print(menuscan)
cmd = input('Select your option: ')
if cmd=="fast":
ipz = input('Insert ip: ')
if systemdet=="Linux":
os.system("mkdir output")
os.system("touch output/"+ipz+"_fast.txt")
print(Fore.RED+"WARNING"+Fore.WHITE+": Scan will be printed in output/"+ipz+"_fast.txt")
os.system("nmap -p 1-100,25565-25600 -T4 -A --open -v -Pn "+ipz+" >>output/"+ipz+"_fast.txt")
exitit = input('Do you want continue?: <y/n> ')
if exitit=="y":
main()
elif exitit=="n":
exit()
else:
main()
pass
else:
print(Fore.RED+"WARNING"+Fore.WHITE+": Scan will be printed in "+ipz+"_output_fast.txt")
f = open(ipz+"_output_fast.txt", "w+")
f.close()
os.system("nmap -p 1-100,25565-25600 -T4 -A --open -v -Pn "+ipz+" >>"+ipz+"_output_fast.txt")
exitit = input('Do you want continue?: <y/n> ')
if exitit=="y":
main()
elif exitit=="n":
exit()
else:
main()
pass
pass
pass
elif cmd=="medium":
ipz = input('Insert ip: ')
if systemdet=="Linux":
os.system("mkdir output")
os.system("touch output/"+ipz+"_medium.txt")
print(Fore.RED+"WARNING"+Fore.WHITE+": Scan will be printed in output/"+ipz+"_medium.txt")
os.system("nmap -p 1-10000,25000-30000 -T4 -A --open -v -Pn "+ipz+" >>output/"+ipz+"_medium.txt")
exitit = input('Do you want continue?: <y/n> ')
if exitit=="y":
main()
elif exitit=="n":
exit()
else:
main()
pass
else:
print(Fore.RED+"WARNING"+Fore.WHITE+": Scan will be printed in "+ipz+"_output_medium.txt")
f = open(ipz+"_output_medium.txt", "w+")
f.close()
os.system("nmap -p 1-10000,25000-30000 -T4 -A --open -v -Pn "+ipz+" >>"+ipz+"_output_medium.txt")
exitit = input('Do you want continue?: <y/n> ')
if exitit=="y":
main()
elif exitit=="n":
exit()
else:
main()
pass
pass
pass
elif cmd=="slow":
ipz = input('Insert ip: ')
if systemdet=="Linux":
os.system("mkdir output")
os.system("touch output/"+ipz+"_slow.txt")
print(Fore.RED+"WARNING"+Fore.WHITE+": Scan will be printed in output/"+ipz+"_slow.txt")
os.system("nmap -p 1-10000,25000-30000 -T4 -A --open -v -Pn "+ipz+" >>output/"+ipz+"_slow.txt")
exitit = input('Do you want continue?: <y/n> ')
if exitit=="y":
main()
elif exitit=="n":
exit()
else:
main()
pass
else:
print(Fore.RED+"WARNING"+Fore.WHITE+": Scan will be printed in "+ipz+"_output_slow.txt")
f = open(ipz+"_output_slow.txt", "w+")
f.close()
os.system("nmap -p 1-10000,25000-30000 -T4 -A --open -v -Pn "+ipz+" >>"+ipz+"_output_slow.txt")
exitit = input('Do you want continue?: <y/n> ')
if exitit=="y":
main()
elif exitit=="n":
exit()
else:
main()
pass
pass
pass
elif cmd=="custom":
ipz = input('Insert ip: ')
portr = input('Insert ports: ')
if systemdet=="Linux":
os.system("mkdir output")
os.system("touch output/"+ipz+"_slow.txt")
print(Fore.RED+"WARNING"+Fore.WHITE+": Scan will be printed in output/"+ipz+"_slow.txt")
os.system("nmap -p "+portr+" -T4 -A --open -v -Pn "+ipz+" >>output/"+ipz+"_slow.txt")
exitit = input('Do you want continue?: <y/n> ')
if exitit=="y":
main()
elif exitit=="n":
exit()
else:
main()
pass
else:
print(Fore.RED+"WARNING"+Fore.WHITE+": Scan will be printed in "+ipz+"_output_slow.txt")
f = open(ipz+"_output_slow.txt", "w+")
f.close()
os.system("nmap -p "+portr+" -T4 -A --open -v -Pn "+ipz+" >>"+ipz+"_output_slow.txt")
exitit = input('Do you want continue?: <y/n> ')
if exitit=="y":
main()
pass
elif exitit=="n":
exit()
pass
else:
main()
pass
pass
pass
else:
main()
pass
def qubo():
print(Fore.RED+"WARNING"+Fore.WHITE+": quboscanner just work with minecraft ports")
quboopt = input('Do you have qubo.jar into h4mtool folder?: <y/n> ')
if quboopt=="y":
iprange = input('Insert ip/range: ')
portrange = input('Insert ports range: ')
timeout = input('Insert ti: ')
threats = input('Insert th: ')
os.system("java -Dfile.encoding=UTF-8 -jar qubo.jar -noping -ports "+portrange+" -th "+threats+" -ti "+timeout+" -all -range "+iprange)
pass
elif quboopt=="n":
main()
pass
else:
main()
pass
def subdomains():
print("Not avaible on this version")
def poisoning():
print("will be added in the future")
main()