-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathaccount_generator.py
129 lines (84 loc) · 4.52 KB
/
account_generator.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
## NOTE: If you are looking for a better account generator, look at https://pigservices.sellix.io/
from selenium import webdriver
from selenium.common.exceptions import TimeoutException, NoSuchElementException, WebDriverException
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.action_chains import ActionChains
from time import sleep
import random
import string
from handlers import Element, DOBNavigator
from selenium.webdriver.common.proxy import Proxy, ProxyType
##############
proxy = "PROXY" # Remember to enter your proxy
speedMultiplier = 5 # Higher speed = more difficult captcha
##########
options = webdriver.ChromeOptions()
p = Proxy()
p.proxy_type = ProxyType.MANUAL
p.http_proxy = proxy
p.ssl_proxy = proxy
options.proxy = p
driver = webdriver.Chrome(options=options, keep_alive=True)
actions = ActionChains(driver)
driver.get("https://discord.com/register")
class InputSelectors:
emailinput = "#uid_5"
displaynameInput = "#uid_6"
usernameInput = "#uid_7"
passwordInput = "#uid_8"
continueButton = "button[type='submit']"
tosCheckbox = '#app-mount > div.appAsidePanelWrapper__714a6 > div.notAppAsidePanel__9d124 > div.app_b1f720 > div > div > div > form > div.centeringWrapper__319b0 > div > div.flex_f5fbb7.horizontal__992f6.justifyStart__42744.alignCenter__84269.noWrap__5c413.marginTop20_d88ee7 > label > div.checkbox_c7f690.box__66058'
### Generate the login details ###
username = ''.join(random.choice(string.digits + string.ascii_letters) for i in range(8))
email = ''.join(random.choice(string.ascii_letters) for i in range(5)) + '@' + "gmail.com"
password = ''.join(random.choice(string.digits + string.ascii_letters) for i in range(8))
##################################
# Find the email input field and type the email
elmnt = Element(driver.find_element(By.NAME, "email"))
elmnt.click().typeSlow(email, speedMultiplier)
# Find the display name input field and type the display name
elmnt = Element(driver.find_element(By.NAME, "global_name"))
elmnt.click().typeSlow(username, speedMultiplier)
# Find the username input field and type the username
elmnt = Element(driver.find_element(By.NAME, "username"))
elmnt.click().typeSlow(username, speedMultiplier)
# Find the password input field and type the password
elmnt = Element(driver.find_element(By.NAME, "password"))
elmnt.click().typeSlow(password, speedMultiplier)
# Slightly more complex functions to increase the believability and accuracy of the date of birth section.
# Each custom defined function has a documented purpose
dobber = DOBNavigator(driver)
dobber.openMenu("day")
selection = dobber.chooseElement(dobber.getMenuObject().getChildren())
selection.scrollIntoView(actions).click()
sleep(0.5/speedMultiplier)
dobber.openMenu("month")
selection = dobber.chooseElement(dobber.getMenuObject().getChildren())
selection.scrollIntoView(actions).click()
sleep(0.5/speedMultiplier)
dobber.openMenu("year")
selection = dobber.chooseElement(dobber.getMenuObject().getChildren())
selection.scrollIntoView(actions).click()
sleep(0.5/speedMultiplier)
try:
driver.find_element(By.CSS_SELECTOR, InputSelectors.tosCheckbox).click() # Accept TOS
sleep(0.3/speedMultiplier)
except NoSuchElementException: # Sometimes the checkbox doesnt appear
pass
driver.find_element(By.CSS_SELECTOR, InputSelectors.continueButton).click() # Continue
print('')
print(r' __ _ _ _ _ _ _ ')
print(r' / _(_) | | (_) | | | | ')
print(r' | |_ _| | | _ _ __ ___ __ _ _ __ | |_ ___| |__ __ _ ')
print(r' | _| | | | | | `_ \ / __/ _` | `_ \| __/ __| `_ \ / _` |')
print(r' | | | | | | | | | | | | (_| (_| | |_) | || (__| | | | (_| |') # Tells user to solve captcha
print(r' |_| |_|_|_| |_|_| |_| \___\__,_| .__/ \__\___|_| |_|\__,_|')
print(r' | | ')
print(r' |_| ')
input('Press ENTER to get 0Auth token.') # Waits for user to solve captcha before moving on
token = driver.execute_script('location.reload();var i=document.createElement("iframe");document.body.appendChild(i);return i.contentWindow.localStorage.token').strip('"') # Get the token
print(f'Made account:')
print(f'{email}:{password}:{username}:{token}')
input("Enter to exit... ")
driver.close()