-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmain.py
193 lines (167 loc) · 6.68 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
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
import secrets
import string
import time
import os
import sys
from datetime import date
from selenium import webdriver
from selenium.webdriver.support.ui import Select
import requests
import threading
def status(text):
os.system('cls' if os.name == 'nt' else 'clear')
print("\033[1;34m" + text + "\033[0m")
#Config
Accounts = 100 #how many accounts
MaxWindows = 3
ActualWindows = 0
# URLs
first_names_url = "https://raw.githubusercontent.com/H20CalibreYT/RobloxAccountCreator/main/firstnames.txt"
last_names_url = "https://raw.githubusercontent.com/H20CalibreYT/RobloxAccountCreator/main/lastnames.txt"
roblox_url = "https://www.roblox.com/"
status("Getting first names...")
first_names_response = requests.get(first_names_url)
status("Getting last names...")
last_names_response = requests.get(last_names_url)
# Check if name loading was successful
if first_names_response.status_code == 200 and last_names_response.status_code == 200:
first_names = list(set(first_names_response.text.splitlines()))
last_names = list(set(last_names_response.text.splitlines()))
else:
status("Name loading failed. Re-Execute the script.")
sys.exit()
# File paths
files_path = os.path.dirname(os.path.abspath(sys.argv[0]))
text_files_folder = os.path.join(files_path, "Accounts")
text_file = os.path.join(text_files_folder, f"Accounts_{date.today()}.txt")
text_file2 = os.path.join(text_files_folder, f"AltManagerLogin_{date.today()}.txt")
# Create folder if it does not exist
if not os.path.exists(text_files_folder):
os.makedirs(text_files_folder)
# Lists of days, months and years
days = [str(i + 1) for i in range(10, 28)]
months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
years = [str(i + 1) for i in range(1980, 2004)]
# Password generator
def gen_password(length):
status("Generating a password...")
chars = string.ascii_letters + string.digits + "Ññ¿?¡!#$%&/()=\/¬|°_-[]*~+"
password = ''.join(secrets.choice(chars) for _ in range(length))
return password
#Username generator
def gen_user(first_names, last_names):
status("Generating a username...")
first = secrets.choice(first_names)
last = secrets.choice(last_names)
full = f"{first}{last}_{secrets.choice([i for i in range(1, 999)]):03}"
return full
def create_account(url, first_names, last_names):
global ActualWindows
try:
status("Starting to create an account...")
cookie_found = False
username_found = False
elapsed_time = 0
status("Initializing webdriver...")
driver = webdriver.Edge()
driver.set_window_size(1200, 800)
driver.set_window_position(0, 0)
#driver.minimize_window()
driver.get(url)
time.sleep(2)
# HTML items
status("searching for items on the website")
username_input = driver.find_element("id", "signup-username")
username_error = driver.find_element("id", "signup-usernameInputValidation")
password_input = driver.find_element("id", "signup-password")
day_dropdown = driver.find_element("id", "DayDropdown")
month_dropdown = driver.find_element("id", "MonthDropdown")
year_dropdown = driver.find_element("id", "YearDropdown")
male_button = driver.find_element("id", "MaleButton")
female_button = driver.find_element("id", "FemaleButton")
register_button = driver.find_element("id", "signup-button")
status("Selecting day...")
Selection = Select(day_dropdown)
Selection.select_by_value(secrets.choice(days))
time.sleep(0.3)
status("Selecting month...")
Selection = Select(month_dropdown)
Selection.select_by_value(secrets.choice(months))
time.sleep(0.3)
status("Selecting year...")
Selection = Select(year_dropdown)
Selection.select_by_value(secrets.choice(years))
time.sleep(0.3)
while not username_found:
status("Selecting username...")
username = gen_user(first_names, last_names)
username_input.clear()
username_input.send_keys(username)
time.sleep(1)
if username_error.text.strip() == "":
username_found = True
status("Selecting password...")
password = gen_password(25)
password_input.send_keys(password)
time.sleep(0.3)
status("Selecting gender...")
gender = secrets.choice([1,2])
if gender == 1:
male_button.click()
else:
female_button.click()
time.sleep(0.5)
status("Registering account...")
register_button.click()
time.sleep(3)
# Wait until the account creation limit is reset
try:
driver.find_element("id", "GeneralErrorText")
driver.quit()
for i in range(360):
status(f"Limit reached, waiting... {i+1}/{360}")
time.sleep(1)
except:
pass
# Wait until the cookie is found or the maximum time has passed
while not cookie_found and elapsed_time < 180:
status("Waiting for the cookie...")
time.sleep(3)
elapsed_time += 3
for cookie in driver.get_cookies():
if cookie.get('name') == '.ROBLOSECURITY':
cookie_found = True
break
if cookie_found:
status("Cookie found...")
result = [cookie.get('value'), username, password]
save_account_info(result)
save_altmanager_login(result)
if result is not None:
status("Successfully created!")
time.sleep(3)
ActualWindows -= 1
status(f"Pestanas abiertas: {ActualWindows}")
pass
except:
status(f"Pestanas abiertas: {ActualWindows}")
ActualWindows -= 1
# Save account information to text file
def save_account_info(account_info):
status("Saving account info...")
with open(text_file, 'a') as file:
file.write(f"Username: {account_info[1]}\nPassword: {account_info[2]}\nCookie: {account_info[0]}\n\n\n")
# Save login information for AltManager
def save_altmanager_login(account_info):
with open(text_file2, 'a') as file:
status("Saving account login (for alt manager)...")
file.write(f"{account_info[1]}:{account_info[2]}\n")
# Create accounts
for _ in range(Accounts):
while ActualWindows >= MaxWindows:
status(f"Esperando... {ActualWindows}/{MaxWindows}")
time.sleep(1)
ActualWindows += 1
account_thread = threading.Thread(target=create_account, args=(roblox_url, first_names, last_names))
account_thread.start()
time.sleep(1)