forked from Aniell4/DiscordHTTPGen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
74 lines (60 loc) · 1.86 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
from hcapbypass import bypass
from generator import TokenGenerator
from discord_webhook import DiscordWebhook
import proxy_processor
import threading
import json
from itertools import cycle
import os
import time
verbose = True
with open("webhooks.json") as whs:
webhooks = json.loads(whs.read())
pool = cycle(webhooks)
genned = 0
def title_worker():
global genned
while True:
os.system(f"title Tokens Generated: {genned}")
time.sleep(0.1)
thread = threading.Thread(target=title_worker, args=(), daemon=True)
thread.start()
def SendToken(token):
global pool, webhooks, genned
wh = next(pool)
if wh == webhooks[0]:
with open("webhooks.json") as whs:
webhooks = json.loads(whs.read())
pool = cycle(webhooks)
wh = next(pool)
webhook_url = wh
webhook = DiscordWebhook(url=webhook_url, content=f'{token}')
webhook.execute()
with open('tokens.txt', 'a') as t:
t.write(token + '\n')
genned += 1
def GenerateToken():
while True:
try:
proxy = proxy_processor.GetProxy()
print("[!] Used proxy: {}".format(proxy))
gen = TokenGenerator(verbose, proxy)
res = gen.GenerateToken()
if 'token' in res:
generatedToken = res["token"]
print("[!] Generated Token: " + generatedToken)
SendToken(generatedToken)
else: print(res)
except Exception as e:
print(e)
continue
def main():
thread_list = []
for i in range(120):
thread = threading.Thread(target=GenerateToken, args=(), daemon=True)
thread.start()
thread_list.append(thread)
for thread in thread_list:
thread.join()
if __name__ == '__main__':
main()