-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
main.py
178 lines (165 loc) · 7.5 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
import asyncio
import re
import browsers
import warnings
from tqdm import TqdmExperimentalWarning
from tqdm.rich import tqdm
from DrissionPage import ChromiumPage, ChromiumOptions
from lib.bypass import CloudflareBypasser
from lib.lib import Main
from datetime import datetime
warnings.filterwarnings("ignore", category=TqdmExperimentalWarning)
async def main():
lib = Main()
port = ChromiumOptions().auto_port()
await lib.getSettingsAndBlockIP()
print("\nEnsuring Chrome availability...")
if browsers.get("chrome") is None:
print(
"\nChrome is required for this tool. Please install it via:\nhttps://google.com/chrome"
)
else:
passw = input(
"\nInput your password for your account.\nIt is recommended for you to stay with the default password, ignore this and press enter\nIf you prefer to input your own password, you might need to manually verify the password strength at https://www.exitlag.com/register yourself.\nPassword: "
)
if passw == "":
passw = "Qing762.chy"
else:
passw = passw
accounts = []
while True:
executionCount = input(
"\nHow many accounts do you want to create?\nIf nothing is entered, the script will stick to the default value (1)\nAmount: "
)
if executionCount == "":
executionCount = 1
break
else:
try:
executionCount = int(executionCount)
break
except ValueError:
print("Invalid number given. Please enter a valid number.")
print()
for i in range(int(executionCount)):
bar = tqdm(total=100)
bar.set_description(f"Initial setup completed [{i + 1}/{executionCount}]")
bar.update(20)
page = ChromiumPage(port)
page.listen.start("https://mails.org", method="POST")
page.get("https://mails.org")
for _ in range(10):
result = page.listen.wait()
if result.url == "https://mails.org/api/email/generate":
email = result.response.body["message"]
break
if not email:
print("Failed to generate email. Exiting...")
continue
bar.set_description(
f"Generate account process completed [{i + 1}/{executionCount}]"
)
bar.update(15)
tab = page.new_tab("https://www.exitlag.com/register")
CloudflareBypasser(tab).bypass()
bar.set_description(
f"Bypassed Cloudflare captcha protection [{i + 1}/{executionCount}]"
)
bar.update(5)
print()
if tab.ele("#inputFirstName", timeout=60):
tab.ele("#inputFirstName").input("qing")
tab.ele("#inputLastName").input("chy")
tab.ele("#inputEmail").input(email)
tab.ele("#inputNewPassword1").input(passw)
tab.ele("#inputNewPassword2").input(passw)
await asyncio.sleep(1)
page.listen.start("https://mails.org", method="POST")
tab.ele(".custom-checkbox--input checkbox").click()
bar.set_description(
f"Signup process completed [{i + 1}/{executionCount}]"
)
bar.update(30)
try:
tab.ele(".btn btn-primary btn-block btn-recaptcha btn-recaptcha-invisible").remove_attr('disabled')
except Exception:
pass
tab.ele(
".btn btn-primary btn-block btn-recaptcha btn-recaptcha-invisible"
).click()
if tab.wait.url_change(
"https://www.exitlag.com/clientarea.php", timeout=60
):
if tab.ele(".alert--title", timeout=60):
link = None
for a in range(10):
result = page.listen.wait()
content = result.response.body["emails"]
if not content:
continue
for emailId, y in content.items():
if (
y["subject"]
== "[ExitLag] Please confirm your e-mail address"
):
links = re.findall(
r"http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+",
y["body"],
)
for link in links:
if link.startswith(
"https://www.exitlag.com/user/verify"
):
link = re.sub(r"</?[^>]+>", "", link)
break
if link:
break
if link:
break
if link:
bar.set_description(
f"Visiting verify email link [{i + 1}/{executionCount}]"
)
bar.update(20)
tab.get(link)
await asyncio.sleep(5)
bar.set_description(
f"Clearing cache and data [{i + 1}/{executionCount}]"
)
bar.update(9)
tab.set.cookies.clear()
tab.clear_cache()
page.set.cookies.clear()
page.clear_cache()
page.quit()
accounts.append({"email": email, "password": passw})
bar.set_description(
f"All process completed [{i + 1}/{executionCount}]"
)
bar.update(1)
bar.close()
print()
else:
print(
"Failed to find the verify email. Skipping and continuing...\n"
)
else:
print("Failed to find the element. Exiting...")
else:
print("Failed to register. Exiting...")
else:
print("Failed to load registration page. Exiting...")
with open("accounts.txt", "a") as f:
for account in accounts:
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
f.write(
f"Email: {account['email']}, Password: {account['password']}, (Created at {timestamp})\n"
)
print("\nAll accounts have been created. Here are the accounts' details:\n")
for account in accounts:
print(f"Email: {account['email']}, Password: {account['password']}")
print(
"\nThey have been saved to the file accounts.txt.\nHave fun using ExitLag!"
)
if __name__ == "__main__":
asyncio.run(main())