-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.py
84 lines (72 loc) · 3.58 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
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
import time
import random,string,os
print("Yasin + Oberonskiiv2 Twitch Account Creator V2")
print("For help DM: yasintr#0001 or Oberonskiiv2#0001 on Discord")
createdaccounts = 0
howmany = int(input("How many accounts you want to generate: "))
howcooldown = int(input("How many seconds the cooldown of creating Accounts should be: "))
def getusername():
total_bytes = os.stat('Data/userdictionary.txt').st_size
random_point = random.randint(0, total_bytes)
file = open('Data/userdictionary.txt')
file.seek(random_point)
file.readline()
return file.readline()
if howcooldown < 1:
print('You cannot wait ' + str(howcooldown) + ' seconds')
time.sleep(1)
raise SystemExit
while createdaccounts < howmany:
# ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
createdaccounts = createdaccounts + 1
username = getusername()
password = ''.join([random.choice(string.ascii_letters + string.digits) for n in range(12)])
email = username + '@gmail.com'
tokenlist = open("tokens.txt", "a")
accountlist = open("accounts.txt", "a")
# ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
driver = webdriver.Chrome("chromedriver.exe")
driver.get("https://twitch.com")
driver.find_element_by_xpath(
'//*[@id="root"]/div/div[2]/nav/div/div[3]/div[3]/div/div[1]/div[2]/button/div/div').click()
time.sleep(2)
print("Entering Account-Information")
driver.find_element_by_xpath('//*[@id="signup-username"]').send_keys(username)
driver.find_element_by_xpath('//*[@id="password-input"]').send_keys(password)
driver.find_element_by_xpath('//*[@id="password-input-confirmation"]').send_keys(password)
driver.find_element_by_xpath(
'/html/body/div[3]/div/div/div/div/div/div[1]/div/div/div[3]/form/div/div[3]/div/div[2]/div[1]/div/input').send_keys(
"27")
Select(driver.find_element_by_xpath(
'/html/body/div[3]/div/div/div/div/div/div[1]/div/div/div[3]/form/div/div[3]/div/div[2]/div[2]/select')).select_by_value(
"8")
driver.find_element_by_xpath(
'/html/body/div[3]/div/div/div/div/div/div[1]/div/div/div[3]/form/div/div[3]/div/div[2]/div[3]/div/input').send_keys(
"1998")
driver.find_element_by_xpath('/html/body/div[3]/div/div/div/div/div/div[1]/div/div/div[3]/form/div/div[4]/div/div[2]/button/div/div[2]').click()
driver.find_element_by_xpath('//*[@id="email-input"]').send_keys(email)
time.sleep(3)
driver.find_element_by_xpath(
'/html/body/div[3]/div/div/div/div/div/div[1]/div/div/div[3]/form/div/div[5]/button/div/div').click()
input("Hit enter when your done solving the captcha.")
driver.refresh()
time.sleep(1)
print("Writing Token into tokens.txt")
tokenvalue = driver.get_cookie('auth-token')
tokenlist.write("\n")
tokenlist.write(tokenvalue["value"])
driver.close()
print("Writing Account-Information into accounts.txt")
accountvalue = username + ":" + password
accountlist.write("\n")
accountlist.write(accountvalue)
print("Account succesfully created")
print('Waiting ' + str(howcooldown) + ' seconds')
time.sleep(howcooldown)
else:
print('Succesfully created ' + str(howmany) + ' account/s')
quti = input("Hit Enter to quit")
raise SystemExit