├── README.md ├── main.py └── proxies.txt /README.md: -------------------------------------------------------------------------------- 1 | # TwitchTokenGen 2 | Solves the funcaptcha and then makes a post request with proxies to the twitch api. Made by nab0rs#4892 (me) 3 | 4 | (ALSO CREATE A "captchas" folder cause im retarded and dont know how to add a folder on github) 5 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import requests, threading, speech_recognition, random, string, os, time, colorama 2 | 3 | 4 | 5 | def getProxies(): 6 | with open('proxies.txt', 'r') as proxies: 7 | proxies = proxies.read().splitlines() 8 | return proxies 9 | # try: 10 | # proxies = '' 11 | # for chunk in requests.get('https://bit.ly/2Or38Z5').iter_content( 12 | # chunk_size=10000): 13 | # if chunk: 14 | # chunk = chunk.decode() 15 | # proxies = proxies + chunk 16 | # proixes = proxies.splitlines() 17 | # except: 18 | # with open('proxies.txt', 'r') as proxies: 19 | # proxies = proxies.read().splitlines() 20 | # return proxies 21 | 22 | 23 | proxies= getProxies() 24 | 25 | def getCaptcha(): 26 | for i in range(1): 27 | try: 28 | with requests.session() as session: 29 | captchaToken = session.post('https://client-api.arkoselabs.com/fc/gt2/public_key/E5554D43-23CC-1982-971D-6A2262A2CA24', data={'public_key':'E5554D43-23CC-1982-971D-6A2262A2CA24', 'rnd':f'0.{random.randint(1000,100000)}', 'userbrowser':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36 Edg/89.0.774.57', 'site':'https://www.twitch.tv', 'language':'en'}, proxies={'http':random.choice(proxies), 'https':random.choice(proxies)}, timeout=20) 30 | threading.Thread(target=create_account,args=(captchaToken.json()['token'],)).start() 31 | except: 32 | pass 33 | 34 | def getClient(): 35 | with requests.session() as session: 36 | client = session.get('https://www.twitch.tv/').text.split('"Client-ID":"')[1].split('",')[0] 37 | return [client, session.cookies] 38 | 39 | success = 0 40 | fail = 0 41 | created = 0 42 | 43 | def count(): 44 | while True: 45 | os.system(f'title S = {success}/ F = {fail} / C = {created}') 46 | time.sleep(1) 47 | 48 | def create_account(token): 49 | global success, fail, created 50 | try: 51 | with requests.session() as session: 52 | session.get('https://www.twitch.tv/') 53 | client_id = getClient() 54 | session.cookies = client_id[1] 55 | client_id = client_id[0] 56 | password = 'nab0rsbotslol3' 57 | username = f'nab0rs{random.randint(1,100005)}' 58 | session_token = token.split('|')[0] 59 | captcha = session.get(f'https://client-api.arkoselabs.com/fc/get_audio/?session_token={session_token}&analytics_tier=40&r=us-west-2&language=en', proxies={'http':random.choice(proxies), 'https':random.choice(proxies)}) 60 | ffname = f'captchas\{random.randint(1,100000)}.wav' 61 | with open(ffname, 'wb') as ff: 62 | ff.write(captcha.content) 63 | regon = speech_recognition.Recognizer() 64 | with speech_recognition.AudioFile(ffname) as ff2: 65 | rec = regon.record(ff2) 66 | raw = regon.recognize_google(rec) 67 | answ = '' 68 | for x in raw: 69 | if x.isdigit(): 70 | answ = answ + x 71 | sovled = session.post('https://client-api.arkoselabs.com/fc/audio/', data={'session_token':session_token, 'language':'en', 'r':'us-west-2', 'audio_type':2, 'response':answ, 'analytics_tier':40}, proxies={'http':random.choice(proxies), 'https':random.choice(proxies)}) 72 | if sovled.json()['response'] == 'correct': 73 | success += 1 74 | for i in range(10): 75 | try: 76 | reg = session.post('https://passport.twitch.tv/register', headers={'accept-language''origin':'https://www.twitch.tv','sec-fetch-dest':'empty', 'sec-fetch-mode':'cors', 'sec-fetch-site':'same-site','referer':'https://www.twitch.tv/','user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36 Edg/89.0.774.57' ,'content-type':'text/plain;charset=UTF-8', 'accept-encoding':'gzip, deflate, br'},json={"username":username,"password":password,"email":f"{username}@gmail.com","birthday":{"day":21,"month":9,"year":1999},"client_id":client_id,"include_verification_code":True,"arkose":{"token":f"{session_token}|r=us-west-2|metabgclr=transparent|guitextcolor=%23000000|metaiconclr=%23757575|meta=3|lang=en|pk=E5554D43-23CC-1982-971D-6A2262A2CA24|at=40|sup=1|rid=25|atp=2|cdn_url=https://cdn.arkoselabs.com/fc|lurl=https://audio-us-west-2.arkoselabs.com|surl=https://client-api.arkoselabs.com"}}, proxies={'http':random.choice(proxies), 'https':random.choice(proxies)}) 77 | print(reg.text) 78 | with open('cookies.txt', 'a') as cookies: 79 | tokenc = reg.json()['access_token'] 80 | cookies.write(f'{username}:{password}:{tokenc} \n') 81 | created += 1 82 | print(f'Account created: {username}:{tokenc}') 83 | break 84 | except: 85 | pass 86 | else: 87 | fail += 1 88 | except: 89 | pass 90 | threading.Thread(target=count,).start() 91 | 92 | 93 | def handle(): 94 | while True: 95 | getCaptcha() 96 | 97 | for x in range(250): 98 | threading.Thread(target=handle,).start() 99 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /proxies.txt: -------------------------------------------------------------------------------- 1 | 2 | --------------------------------------------------------------------------------