-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHackSQ.py
More file actions
429 lines (401 loc) Β· 19.1 KB
/
Copy pathHackSQ.py
File metadata and controls
429 lines (401 loc) Β· 19.1 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
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
# pip install colorama
# pip install mcstatus
# pip install re
# pip install requests
import mcstatus
import minecraft
import json
import random
import requests
import os
import re
import __future__
import requests.exceptions
import time
import socket
from urllib.error import URLError
from urllib.parse import urlsplit
import urllib.request
from urllib.request import urlopen
from colorama import *
from mcstatus import *
from minecraft.networking.connection import Connection
from minecraft.networking.packets import Packet, clientbound, serverbound
from minecraft.compat import input
init()
os.system("cls")
def info_update(message):
print(f' {message}\r', end='')
def help():
print (f"""
{Fore.WHITE}ββββββββββββββββββββββββββββββββββββ
{Fore.WHITE}β {Fore.MAGENTA}help {Fore.WHITE}- {Fore.MAGENTA}Show this menu. {Fore.WHITE}β
{Fore.WHITE}β {Fore.MAGENTA}scanning {Fore.WHITE}- {Fore.MAGENTA}Show scanning menu. {Fore.WHITE}β
{Fore.WHITE}β {Fore.MAGENTA}minecraft {Fore.WHITE}- {Fore.MAGENTA}Show Minecraft menu. {Fore.WHITE}β
{Fore.WHITE}β {Fore.MAGENTA}ipt {Fore.WHITE}- {Fore.MAGENTA}Show IP tools menu. {Fore.WHITE}β
{Fore.WHITE}β {Fore.MAGENTA}clear {Fore.WHITE}- {Fore.MAGENTA}Clear the screen. {Fore.WHITE}β
{Fore.WHITE}ββββββββββββββββββββββββββββββββββββ
""")
def minecraft():
print (f"""
{Fore.WHITE}ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{Fore.WHITE}β {Fore.MAGENTA}connect [ip] [port] [nick] {Fore.WHITE}- {Fore.MAGENTA}Connect to a Minecraft server (Offline Mode). {Fore.WHITE}β
{Fore.WHITE}β {Fore.MAGENTA}server [ip] {Fore.WHITE}- {Fore.MAGENTA}Lookup Minecraft servers. {Fore.WHITE}β
{Fore.WHITE}β {Fore.MAGENTA}player [nick/uuid] {Fore.WHITE}- {Fore.MAGENTA}Lookup Minecraft players. {Fore.WHITE}β
{Fore.WHITE}ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
""")
def scanning():
print (f"""
{Fore.WHITE}ββββββββββββββββββββββββββββββββββββββββ
{Fore.WHITE}β {Fore.MAGENTA}subds [domain] {Fore.WHITE}- {Fore.MAGENTA}Subdomains scanner. {Fore.WHITE}β
{Fore.WHITE}ββββββββββββββββββββββββββββββββββββββββ
""")
def ipt():
print (f"""
{Fore.WHITE}βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{Fore.WHITE}β {Fore.MAGENTA}locate [ip] {Fore.WHITE}- {Fore.MAGENTA}Geolocate IPv4. {Fore.WHITE}β
{Fore.WHITE}β {Fore.MAGENTA}dbs [nick] {Fore.WHITE}- {Fore.MAGENTA}Find Minecraft players IP. (230K IP DB) {Fore.WHITE}β
{Fore.WHITE}β {Fore.MAGENTA}dbs-c [nick] [path to db] {Fore.WHITE}- {Fore.MAGENTA}Find Minecraft players IP. (Custom DB) {Fore.WHITE}β
{Fore.WHITE}β {Fore.MAGENTA}scrape-p [http/sock4/sock5/all] {Fore.WHITE}- {Fore.MAGENTA}Scrape Proxies. {Fore.WHITE}β
{Fore.WHITE}βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
""")
def banner():
os.system("title β₯ HackSQ Private Tool β₯")
print (f"""{Style.NORMAL}
{Fore.WHITE}
{Fore.WHITE}----------------------------------------------------{Fore.CYAN}
βββ ββ βββ ββββββ ββ βββ ββββββ βββββ
ββββ βββββββββ ββββ ββ βββββ βββ β ββββ βββ
βββββββββββ βββ βββ β ββββββ β ββββ ββββ βββ
βββ βββ βββββββββ ββββ βββββββ ββ β ββββββ ββ β
ββββββββ ββ βββββ βββββ βββββ βββββββββββββββββββ
β βββββ ββ βββββ ββ β ββ ββ βββ βββ β βββ βββ β
β βββ β β ββ β β β β ββ βββ ββ β β β ββ β
β ββ β β β β β ββ β β β β β β
β β β β ββ β β β β β
β
{Fore.WHITE}ββββββββββββββββββββββββββββββββββββββββββββββββββββ
{Fore.WHITE}β {Fore.MAGENTA}Telegram {Fore.WHITE}- {Fore.MAGENTA}t.me/squadhackers {Fore.WHITE}β
{Fore.WHITE}β {Fore.MAGENTA}Discord {Fore.WHITE}- {Fore.MAGENTA}discord.gg/2gvrG8c {Fore.WHITE}β
{Fore.WHITE}β {Fore.MAGENTA}Author {Fore.WHITE}- {Fore.MAGENTA}iTsToastZ (iTsToastZ#2870) {Fore.WHITE}β
{Fore.WHITE}ββββββββββββββββββββββββββββββββββββββββββββββββββββ
""")
banner()
while True:
print (f" {Fore.WHITE}ββ[{Fore.MAGENTA}root{Fore.WHITE}@{Fore.MAGENTA}HackSQ{Fore.WHITE}]{Fore.MAGENTA}-{Fore.WHITE}[{Fore.MAGENTA}-{Fore.WHITE}]")
print (f" {Fore.WHITE}βββββββββββ $ ", end='')
x = input().split()
try:
cmd = x[0].lower()
if cmd == "help":
help()
elif cmd == "scrape-p":
try:
type = x[1].lower()
if type == "http":
try:
file = open("proxies.txt", "a+")
res = requests.get('https://api.proxyscrape.com/?request=displayproxies&proxytype=http&timeout=1500')
proxies = []
for proxy in res.text.split('\n'):
proxy = proxy.strip()
if proxy:
proxies.append(proxy)
for p in proxies:
file.write((p)+"\n")
print ()
print(f' Scraped {len(proxies)} proxies @ proxies.txt !')
print ()
except Exception as e:
print(f" An error occurred while downloading proxies from ProxyScrape.com: {e}")
elif type == "sock5":
try:
file = open("proxies.txt", "a+")
res = requests.get('https://api.proxyscrape.com/?request=displayproxies&proxytype=socks5&timeout=1500')
proxies = []
for proxy in res.text.split('\n'):
proxy = proxy.strip()
if proxy:
proxies.append(proxy)
for p in proxies:
file.write((p)+"\n")
print ()
print(f' Scraped {len(proxies)} proxies @ proxies.txt !')
print ()
except Exception as e:
print(f" An error occurred while downloading proxies from ProxyScrape.com: {e}")
elif type == "sock4":
try:
file = open("proxies.txt", "a+")
res = requests.get('https://api.proxyscrape.com/?request=displayproxies&proxytype=socks4&timeout=1500')
proxies = []
for proxy in res.text.split('\n'):
proxy = proxy.strip()
if proxy:
proxies.append(proxy)
for p in proxies:
file.write((p)+"\n")
print ()
print(f' Scraped {len(proxies)} proxies @ proxies.txt !')
print ()
except Exception as e:
print(f" An error occurred while downloading proxies from ProxyScrape.com: {e}")
elif type == "all":
try:
file = open("proxies.txt", "a+")
res = requests.get('https://api.proxyscrape.com/?request=displayproxies&proxytype=all&timeout=1500')
proxies = []
for proxy in res.text.split('\n'):
proxy = proxy.strip()
if proxy:
proxies.append(proxy)
for p in proxies:
file.write((p)+"\n")
print ()
print(f' Scraped {len(proxies)} proxies @ proxies.txt !')
print ()
except Exception as e:
print(f" An error occurred while downloading proxies from ProxyScrape.com: {e}")
file.close()
else:
print ()
print (f"""
{Fore.MAGENTA}{Fore.WHITE}{Fore.WHITE}ββββββββββββββββββββββββββββββββββββββββββ
{Fore.WHITE}β {Fore.MAGENTA}Usage: scrape-p [http/sock4/sock5/all].{Fore.WHITE}β
{Fore.MAGENTA}{Fore.WHITE}{Fore.WHITE}ββββββββββββββββββββββββββββββββββββββββββ
""")
except:
print ()
print (f"""
{Fore.MAGENTA}{Fore.WHITE}{Fore.WHITE}ββββββββββββββββββββββββββββββββββββββββββ
{Fore.WHITE}β {Fore.MAGENTA}Usage: scrape-p [http/sock4/sock5/all].{Fore.WHITE}β
{Fore.MAGENTA}{Fore.WHITE}{Fore.WHITE}ββββββββββββββββββββββββββββββββββββββββββ
""")
elif cmd == "minecraft":
minecraft()
elif cmd == "scanning":
scanning()
elif cmd == "ipt":
ipt()
elif cmd == "subds":
try:
target = x[1]
f = open("subdomains.txt")
print ()
lines = f.readlines()
lines = [x.strip() for x in lines]
for line in lines:
try:
final = (line)+"."+(target)
ip = socket.gethostbyname(final)
try:
server = MinecraftServer.lookup(ip)
status = server.status()
if "104." in ip:
print (f"{Fore.WHITE} IP: "+(ip)+f" {Fore.MAGENTA}= {Fore.WHITE}"+(final)+" ("+str(status.version.name)+") ("+str(status.players.online)+"/"+str(status.players.max)+") (Cloufare)")
else:
print (f"{Fore.WHITE} IP: "+(ip)+f" {Fore.MAGENTA}= {Fore.WHITE}"+(final)+" ("+str(status.version.name)+") ("+str(status.players.online)+"/"+str(status.players.max)+")")
except:
if "104." in ip:
print (f"{Fore.WHITE} IP: "+(ip)+f" {Fore.MAGENTA}= {Fore.WHITE}"+(final)+" (No Minecraft Detected) (Cloudfare)")
else:
print (f"{Fore.WHITE} IP: "+(ip)+f" {Fore.MAGENTA}= {Fore.WHITE}"+(final)+" (No Minecraft Detected)")
except:
pass
print()
except:
print ()
print (f"""
{Fore.MAGENTA}{Fore.WHITE}{Fore.WHITE}βββββββββββββββββββββββββ
{Fore.WHITE}β {Fore.MAGENTA}Usage: subds [domain].{Fore.WHITE}β
{Fore.MAGENTA}{Fore.WHITE}{Fore.WHITE}βββββββββββββββββββββββββ
""")
elif cmd == "dbs-c":
try:
target = x[1]
path = x[2]
print ()
time.sleep(2)
try:
with open(path) as f:
lines = f.readlines()
lines = [x.strip() for x in lines]
print (" Searching, Please Wait...")
print ()
for line in lines:
if target in line:
print (" Found: "+(line))
except:
print ()
print (f"""
{Fore.MAGENTA}{Fore.WHITE}{Fore.WHITE}βββββββββββββββββββββββββββββββββ
{Fore.WHITE}β {Fore.MAGENTA}Usage: Incorrect path to db. {Fore.WHITE}β
{Fore.MAGENTA}{Fore.WHITE}{Fore.WHITE}βββββββββββββββββββββββββββββββββ
""")
print ()
except:
print ()
print (f"""
{Fore.MAGENTA}{Fore.WHITE}{Fore.WHITE}βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
{Fore.WHITE}β {Fore.MAGENTA}Usage: dbs-c [nick/uuid] [path to db]. {Fore.WHITE}β
{Fore.MAGENTA}{Fore.WHITE}{Fore.WHITE}βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
""")
elif cmd == "dbs":
try:
target = x[1]
print ()
print (" Searching, Please Wait...")
print ()
time.sleep(2)
try:
with open("database.txt") as f:
lines = f.readlines()
lines = [x.strip() for x in lines]
for line in lines:
if target in line:
print (" Found: "+(line))
except:
pass
print ()
except Exception as e:
print ()
print (f"""
{Fore.MAGENTA}{Fore.WHITE}{Fore.WHITE}βββββββββββββββββββββββββββββββββββββ
{Fore.WHITE}β {Fore.MAGENTA}Usage: dbs [nick/uuid]. {Fore.WHITE}β
{Fore.MAGENTA}{Fore.WHITE}{Fore.WHITE}βββββββββββββββββββββββββββββββββββββ
""")
elif cmd == "connect":
try:
server = x[1]
port = x[2]
nick = x[3]
connection = Connection(server, int(port), username=nick)
def handle_join_game(join_game_packet):
print(" Connected !")
print ()
connection.register_packet_listener(handle_join_game, clientbound.play.JoinGamePacket)
def print_chat(chat_packet):
json_data = chat_packet.json_data
print(f"{Fore.MAGENTA} DATA >> {Fore.WHITE}"+str(chat_packet.json_data)+f"{Fore.MAGENTA} / Position >> {Fore.CYAN}"+str(chat_packet.position))
connection.connect()
while True:
# NICK TO OP
print ()
print (f" {Fore.WHITE}ββ[{Fore.MAGENTA}root{Fore.WHITE}@{Fore.MAGENTA}HackSQ{Fore.WHITE}]{Fore.MAGENTA}-{Fore.WHITE}[{Fore.MAGENTA}Set the command to execute{Fore.WHITE}]")
print (f" {Fore.WHITE}βββββββββββ $ ", end='')
text = input()
print ()
connection.register_packet_listener(print_chat, clientbound.play.ChatMessagePacket)
packet = serverbound.play.ChatPacket()
packet.message = text
connection.write_packet(packet)
except Exception as e:
print ()
print (e)
print (f"""
{Fore.MAGENTA}{Fore.WHITE}{Fore.WHITE}βββββββββββββββββββββββββββββββββββββ
{Fore.WHITE}β {Fore.MAGENTA}Usage: connect [ip] [port] [nick].{Fore.WHITE}β
{Fore.MAGENTA}{Fore.WHITE}{Fore.WHITE}βββββββββββββββββββββββββββββββββββββ
""")
elif cmd == "server":
try:
target = x[1]
try:
server = MinecraftServer.lookup(target)
status = server.status()
print ()
print (" IP: "+(target))
print (" Players: "+str(status.players.online)+"/"+str(status.players.max))
print (" Version: "+str(status.version.name)+" - "+str(status.version.protocol))
print (" Description: "+str(status.description))
print ()
except Exception as e:
print ()
print (f"""
{Fore.MAGENTA}{Fore.WHITE}βββββββββββββββββββββββββ
{Fore.WHITE}β {Fore.MAGENTA}Can't resolve server. {Fore.WHITE}β
{Fore.MAGENTA}{Fore.WHITE}βββββββββββββββββββββββββ
""")
except:
print ()
print (f"""
{Fore.MAGENTA}{Fore.WHITE}βββββββββββββββββββββββ
{Fore.WHITE}β {Fore.MAGENTA}Usage: server [ip].{Fore.WHITE}β
{Fore.MAGENTA}{Fore.WHITE}βββββββββββββββββββββββ
""")
elif cmd == "clear":
os.system("cls")
banner()
elif cmd == "locate":
try:
target = x[1]
try:
url = ("http://ip-api.com/json/")
response = urllib.request.urlopen(url + target)
data = response.read()
jso = json.loads(data)
print (jso)
print ()
print (f"{Fore.WHITE} IP: "+(target))
print (f"{Fore.WHITE} ISP: "+(jso["isp"]))
print ()
print (f" {Fore.MAGENTA}[{Fore.WHITE}#{Fore.MAGENTA}]{Fore.WHITE} Country: "+(jso["country"])+" - TZ: "+(jso["timezone"]))
print (f" {Fore.WHITE}β")
print (f" {Fore.WHITE}ββ{Fore.MAGENTA}[{Fore.WHITE}#{Fore.MAGENTA}]{Fore.WHITE} Region: "+(jso["regionName"])+" - "+(jso["zip"]))
print (f" {Fore.WHITE}β")
print (f" {Fore.WHITE}ββ{Fore.MAGENTA}[{Fore.WHITE}#{Fore.MAGENTA}]{Fore.WHITE} City: "+(jso["city"]))
print ()
except Exception as e:
print (e)
print ()
print (f"""
{Fore.MAGENTA}{Fore.WHITE}βββββββββββββββββββββββββ
{Fore.WHITE}β {Fore.MAGENTA}Can't resolve target. {Fore.WHITE}β
{Fore.MAGENTA}{Fore.WHITE}βββββββββββββββββββββββββ
""")
except:
print ()
print (f"""
{Fore.MAGENTA}{Fore.WHITE}βββββββββββββββββββββββ
{Fore.WHITE}β {Fore.MAGENTA}Usage: locate [ip].{Fore.WHITE}β
{Fore.MAGENTA}{Fore.WHITE}βββββββββββββββββββββββ
""")
elif cmd == "player":
try:
target = x[1]
url = "https://api.mojang.com/users/profiles/minecraft/"
text123 = requests.get((url)+(target))
if text123.text == "":
print ()
print (f"{Fore.WHITE} Nick: "+(target))
print (f"{Fore.WHITE} UUID: *")
print (f"{Fore.WHITE} Type: Cracked")
print ()
else:
asmr = (text123.text).split('"')
uuid = (asmr)[3]
print ()
print (f"{Fore.WHITE} Nick: "+(target))
print (f"{Fore.WHITE} UUID: "+(uuid))
print (f"{Fore.WHITE} Type: Premium")
print ()
except Exception as e:
print (e)
print ()
print (f"""
{Fore.MAGENTA}{Fore.WHITE}{Fore.WHITE}ββββββββββββββββββββββββ
{Fore.WHITE}β {Fore.MAGENTA}Usage: player [nick].{Fore.WHITE}β
{Fore.MAGENTA}{Fore.WHITE}{Fore.WHITE}ββββββββββββββββββββββββ
""")
else:
print (f"""
{Fore.MAGENTA}{Fore.WHITE}{Fore.WHITE}βββββββββββββββββββββββββββββββββββββββ
{Fore.WHITE}β {Fore.MAGENTA}Usage: Unknow command, type 'help'. {Fore.WHITE}β
{Fore.MAGENTA}{Fore.WHITE}{Fore.WHITE}βββββββββββββββββββββββββββββββββββββββ
""")
except:
print (f"""
{Fore.MAGENTA}{Fore.WHITE}{Fore.WHITE}βββββββββββββββββββββββββββββββββββββββ
{Fore.WHITE}β {Fore.MAGENTA}Usage: Unknow command, type 'help'. {Fore.WHITE}β
{Fore.MAGENTA}{Fore.WHITE}{Fore.WHITE}βββββββββββββββββββββββββββββββββββββββ
""")