forked from Its-Vichy/IOGen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
65 lines (49 loc) · 2.16 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
# Temp main to people who whant to work on it
from modules.session import HttpSession
from modules.discord import DiscordApi, DiscordWs
from modules.captcha import CaptchaSolver
from modules.console import Console
import random, threading, httpx, time, json, itertools
num = "115427" ##DiscordApi.get_build_number() #Yes because i don't whant to wait 20min to get this shit after each debug
print(num)
proxies = open('./proxies.txt', 'r+').read().splitlines() # itertools.cycle() / next(proxies) to made perfect rotation but i put random to debug
config = json.load(open('./config.json'))
def worker():
try:
pp = None
while pp == None:
try:
prox = 'http://' + random.choice(proxies)
httpx.get('https://google.com', proxies=prox, timeout=5)
pp = prox
except Exception as e:
Console.debug('[-] Invalid proxy found')
pass
Console.debug('[*] Valid proxy found')
session = HttpSession(pp)
api = DiscordApi()
c = CaptchaSolver().get_captcha_by_ai(pp.split('://')[1]) #get_captcha_key(pp.split('://')[1], pp.split('://')[1])
if c == 'ERROR' or c is None:
Console.debug(f'[-] Captcha proxy error')
return
Console.debug(f'[@] Captcha solved: {c[:20]}')
session.get_cookies()
token = api.register(session.http_client, c, num)
Console.debug(f'[>] Generated token: {token}')
if 'token' in str(token):
DiscordWs(token).start()
print(DiscordApi.check_flag(session.http_client, token['token']))
except Exception as e:
Console.debug(f'[-] Exception worker: {e}')
if __name__ == '__main__':
Console.print_logo()
threading.Thread(target=Console.key_bind_thread).start()
threading.Thread(target=Console.title_thread).start()
"""
Removed for debug dont start 3k thread loop.
"""
"""while True:
while threading.active_count() >= config['threads']:
time.sleep(1)"""
for _ in range(20):
threading.Thread(target=worker).start()