Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update main.py #23

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
297 changes: 160 additions & 137 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
import re
import browsers
import warnings
import time
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)

Expand All @@ -19,159 +19,182 @@ async def main():
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"
"\033[1m"
"\nWarning: A Chrome installation has not been detected! Chrome is required for the use of this tool"
"\033[0m"
)
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: "
print(
"In the case you have an alternate or undetected installation, you may ignore this"
)

if passw == "":
passw = "Qing762.chy"
else:
passw = passw
passw = (
input(
"\033[1m"
"\n(RECOMMENDED) Press enter in order to use the default password"
"\033[0m"
"\nIf you prefer to use your own password, you need to manually verify its strength at https://www.exitlag.com/register\nPassword: "
)
or "Qing762.chy"
)

accounts = []
accounts = []
executionCount = input(
"\033[1m"
"\n(RECOMMENDED) Press enter in order to generate the default of 1 account"
"\033[0m"
"\nNumber of accounts to generate: "
)
executionCount = int(executionCount) if executionCount.isdigit() else 1

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
print()
print("\033c\033[3J\033[2J\033[0m\033[H")

for i in range(executionCount):
bar = tqdm(total=100)
bar.set_description(f"Initial setup [{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"Account generation process [{i + 1}/{executionCount}]")
bar.update(15)

tab = page.new_tab("https://www.exitlag.com/register")
CloudflareBypasser(tab).bypass()

bar.set_description(f"Cloudflare captcha bypass [{i + 1}/{executionCount}]")
bar.update(5)

startTime = time.time()
while True:
endTime = time.time()
if endTime - startTime > 10:
print("Failed to load registration page. Exiting...")
return
else:
try:
executionCount = int(executionCount)
if tab.ele("#:fullpage-overlay").style("display") == "none":
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"]

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)
page.listen.start("https://mails.org", method="POST")

startTime = time.time()
while True:
endTime = time.time()
if endTime - startTime > 10:
print("Failed to find captcha. Exiting...")
return
else:
if tab.ele(".:grecaptcha-badge"):
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"
tab.ele(".custom-checkbox--input checkbox").click()

bar.set_description(f"Signup process [{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"
):
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:
link = re.sub(r"</?[^>]+>", "", 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...")
break
if link:
break

if link:
bar.set_description(
f"Verifying email address [{i + 1}/{executionCount}]"
)
bar.update(20)
tab.get(link)

bar.set_description(f"Clearing cache and data")
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"Done [{i + 1}/{executionCount}]")
bar.update(1)
bar.close()
print()
else:
print("Failed to register. Exiting...")
else:
print("Failed to load registration page. Exiting...")
print(
"Failed to find verification email. You may need to verify it manually. Skipping and continuing...\n"
)
else:
print("Failed to register. 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")
with open("accounts.txt", "a") as f:
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!"
)
timestamp = time.strftime("%Y-%m-%d %H:%M:%S")
f.write(
f"Email: {account['email']}, Password: {account['password']}, (Created at {timestamp})\n"
)

print("\033c\033[3J\033[2J\033[0m\033[H")

print("\033[1m" "Credentials:")

for account in accounts:
print(f"Email: {account['email']}, Password: {account['password']}")
print("\033[0m" "\nCredentials saved to accounts.txt\nHave fun using ExitLag!")
input("Press Enter to exit...")


if __name__ == "__main__":
Expand Down
Loading