Skip to content
This repository was archived by the owner on May 24, 2025. It is now read-only.

Commit 0816115

Browse files
committed
Changed from selenium to DrissionPage
Fixed Cloudflare verification page. Launched v3
1 parent 8869fd8 commit 0816115

File tree

4 files changed

+118
-165
lines changed

4 files changed

+118
-165
lines changed

.github/workflows/workflow.py

Lines changed: 66 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
import random
33
import time
44
import re
5+
import browsers
6+
import sys
7+
from DrissionPage import ChromiumPage
8+
from DrissionPage.common import wait_until
59
from selenium.webdriver.support.ui import WebDriverWait
610
from requests_html import HTMLSession
711
from selenium.webdriver.common.by import By
@@ -14,17 +18,36 @@ def get_random_string(length):
1418
letters = string.ascii_lowercase
1519
return "".join(random.choice(letters) for i in range(length))
1620

21+
def wait_until_url(page, target_url, timeout=30):
22+
"""
23+
Wait until the current URL of the page matches the target URL.
24+
25+
Parameters:
26+
page (DrissionPage): The DrissionPage instance.
27+
target_url (str): The target URL to wait for.
28+
timeout (int): The maximum time to wait in seconds. Default is 30.
29+
30+
Returns:
31+
bool: True if the current URL matches the target URL, False if the timeout is reached.
32+
"""
33+
start_time = time.time()
34+
while time.time() - start_time < timeout:
35+
if page.url == target_url:
36+
return True
37+
time.sleep(0.5)
38+
return False
1739

1840
passw = "Qing762.chy"
19-
maildomain = "mail.tm"
41+
maildomain = "mail.gw"
2042

2143
print(
2244
"\nDue to the inner workings of the module, it is needed to browse programmatically.\nNEVER use the gui to navigate (Using your keybord and mouse) as it will causes POSSIBLE DETECTION!\nThe script will do the entire job itself.\n"
2345
)
2446

25-
2647
request = HTMLSession()
27-
domain = request.get(f"https://api.{maildomain}/domains", params={"page": "1"}).json()
48+
domain = request.get(
49+
f"https://api.{maildomain}/domains", params={"page": "1"}
50+
).json()
2851
for x in domain["hydra:member"]:
2952
register = request.post(
3053
f"https://api.{maildomain}/accounts",
@@ -38,80 +61,43 @@ def get_random_string(length):
3861
f"https://api.{maildomain}/token", json={"address": email, "password": passw}
3962
).json()["token"]
4063

41-
with DriverContext(uc=True, headless=False, dark_mode=True) as browser:
42-
stealth(
43-
browser,
44-
languages=["en-US", "en"],
45-
vendor="Google Inc.",
46-
platform="Win32",
47-
webgl_vendor="Intel Inc.",
48-
renderer="Intel Iris OpenGL Engine",
49-
fix_hairline=True,
50-
)
51-
52-
browser.get("http://exitlag.com/register")
53-
time.sleep(3)
54-
firstnameelement = browser.find_element(By.NAME, "firstname")
55-
firstnameelement.send_keys("qing")
56-
lastnameelement = browser.find_element(By.NAME, "lastname")
57-
lastnameelement.send_keys("chycr")
58-
emailelement = browser.find_element(By.NAME, "email")
59-
emailelement.send_keys(email)
60-
passwordelement = browser.find_element(By.NAME, "password")
61-
passwordelement.send_keys(passw)
62-
password2element = browser.find_element(By.NAME, "password2")
63-
password2element.send_keys(passw)
64-
time.sleep(3)
65-
browser.execute_script(
66-
"arguments[0].click();",
67-
browser.find_element(By.XPATH, '//*[@id="frmCheckout"]/p[1]/label/div/ins'),
68-
)
69-
time.sleep(0.5)
70-
browser.execute_script(
71-
"arguments[0].click();",
72-
browser.find_element(By.XPATH, '//*[@id="frmCheckout"]/p[2]/input'),
73-
)
74-
try:
75-
element = WebDriverWait(driver=browser, timeout=60).until(
76-
EC.presence_of_element_located(
77-
(By.XPATH, '//*[@id="main-body"]/div[1]/section/div/div/h2')
78-
)
79-
)
80-
except Exception:
81-
print("XPath not found.")
82-
finally:
83-
msg = request.get(
84-
f"https://api.{maildomain}/messages",
85-
params={"page": "1"},
86-
headers={"Authorization": f"Bearer {token}"},
87-
).json()
88-
if (
89-
msg["hydra:member"][0]["intro"]
90-
== "Hello and welcome qing! You are now a step away from getting the best communications to improve your gameplay and get rid of…"
91-
):
92-
msgid = msg["hydra:member"][0]["id"]
93-
else:
94-
msgid = msg["hydra:member"][1]["id"]
95-
fullmsg = request.get(
96-
f"https://api.{maildomain}/messages/{msgid}",
97-
params={"id": f"{msgid}"},
98-
headers={"Authorization": f"Bearer {token}"},
99-
).json()
100-
link = re.findall(
101-
r"http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+",
102-
fullmsg["text"],
103-
)[0]
104-
browser.get(f"{link}")
105-
try:
106-
element = WebDriverWait(driver=browser, timeout=60).until(
107-
EC.presence_of_element_located(
108-
(By.XPATH, '//*[@id="main-body"]/div[1]/section/div/div/h2')
109-
)
110-
)
111-
except Exception:
112-
print("XPath not found.")
113-
finally:
114-
browser.quit()
115-
print(f"Your email address: {email}\nYour password: {passw}\n")
116-
print("Have fun using ExitLag!")
117-
exit()
64+
page = ChromiumPage()
65+
page.get("https://www.exitlag.com/register")
66+
page.ele('#inputFirstName').input("qing")
67+
page.ele('#inputLastName').input("chy")
68+
page.ele('#inputEmail').input(email)
69+
page.ele('#inputNewPassword1').input(passw)
70+
page.ele('#inputNewPassword2').input(passw)
71+
element = page.ele('.icheck-button')
72+
element.click()
73+
element = page.ele('.btn btn-primary btn-line fw-500 font-18 py-2 w-100 btn-recaptcha btn-recaptcha-invisible')
74+
element.click()
75+
if wait_until_url(page, "https://www.exitlag.com/register-success", timeout=60):
76+
time.sleep(2)
77+
msg = request.get(
78+
f"https://api.{maildomain}/messages",
79+
params={"page": "1"},
80+
headers={"Authorization": f"Bearer {token}"},
81+
).json()
82+
if (
83+
msg["hydra:member"][0]["intro"]
84+
== "Hello and welcome qing! You are now a step away from getting the best communications to improve your gameplay and get rid of…"
85+
):
86+
msgid = msg["hydra:member"][0]["id"]
87+
else:
88+
msgid = msg["hydra:member"][1]["id"]
89+
fullmsg = request.get(
90+
f"https://api.{maildomain}/messages/{msgid}",
91+
params={"id": f"{msgid}"},
92+
headers={"Authorization": f"Bearer {token}"},
93+
).json()
94+
link = re.findall(
95+
r"http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+",
96+
fullmsg["text"],
97+
)[0]
98+
page.get(f"{link}")
99+
time.sleep(5)
100+
page.quit()
101+
print(f"Your email address: {email}\nYour password: {passw}\n")
102+
print("Have fun using ExitLag!")
103+
exit()

.github/workflows/workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ jobs:
4949
uses: softprops/action-gh-release@v2.0.4
5050
with:
5151
files: release.zip
52-
name: "Release v2.${{ github.run_number }}"
52+
name: "Release v3.${{ github.run_number }}"
5353
body: "Commit: ${{ github.sha }}\nDownload the `release.zip` file and you are good to go!\nContinue by following the steps given in the README."
5454
tag_name: ${{ github.ref_name }}

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ The process begins by utilizing the [Mail.GW](https://mail.gw/) service to obtai
1919
- Bypass Cloudflare's bot check.
2020
- The script does all the job itself, including the captcha (which in the past you need to do it manually)
2121
- Able to choose between email service provider
22+
- No webdriver required
23+
- Fast execution time
2224

2325
> **Warning**
2426
> It is important to note that excessive usage of this tool may result in rate limiting by the API or, in severe cases, IP blocking. To avoid these potential consequences, it is recommended to limit the number of usage. (Maybe 5 times every 10 minutes?)

main.py

Lines changed: 49 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,24 @@
44
import re
55
import browsers
66
import sys
7-
from selenium.webdriver.support.ui import WebDriverWait
7+
from DrissionPage import ChromiumPage
88
from requests_html import HTMLSession
9-
from selenium.webdriver.common.by import By
10-
from selenium_stealth import stealth
11-
from seleniumbase import DriverContext
12-
from selenium.webdriver.support import expected_conditions as EC
139

1410

1511
def get_random_string(length):
1612
letters = string.ascii_lowercase
1713
return "".join(random.choice(letters) for i in range(length))
1814

19-
15+
def wait_until_url(page, target_url, timeout=30):
16+
start_time = time.time()
17+
while time.time() - start_time < timeout:
18+
if page.url == target_url:
19+
return True
20+
time.sleep(0.5)
21+
return False
22+
2023
print("\nEnsuring Chrome availability...")
2124

22-
2325
if browsers.get("chrome") is None:
2426
print(
2527
"\nChrome is required for this tool. Please install it via:\nhttps://google.com/chrome"
@@ -43,7 +45,7 @@ def get_random_string(length):
4345
elif maildomain == "2":
4446
maildomain = "mail.tm"
4547
elif maildomain == "":
46-
maildomain = "mail.tm"
48+
maildomain = "mail.gw"
4749
else:
4850
sys.exit("Unknown text given. Exiting...")
4951

@@ -68,80 +70,43 @@ def get_random_string(length):
6870
f"https://api.{maildomain}/token", json={"address": email, "password": passw}
6971
).json()["token"]
7072

71-
with DriverContext(uc=True, headless=False, dark_mode=True) as browser:
72-
stealth(
73-
browser,
74-
languages=["en-US", "en"],
75-
vendor="Google Inc.",
76-
platform="Win32",
77-
webgl_vendor="Intel Inc.",
78-
renderer="Intel Iris OpenGL Engine",
79-
fix_hairline=True,
80-
)
81-
82-
browser.get("http://exitlag.com/register")
83-
time.sleep(3)
84-
firstnameelement = browser.find_element(By.NAME, "firstname")
85-
firstnameelement.send_keys("qing")
86-
lastnameelement = browser.find_element(By.NAME, "lastname")
87-
lastnameelement.send_keys("chycr")
88-
emailelement = browser.find_element(By.NAME, "email")
89-
emailelement.send_keys(email)
90-
passwordelement = browser.find_element(By.NAME, "password")
91-
passwordelement.send_keys(passw)
92-
password2element = browser.find_element(By.NAME, "password2")
93-
password2element.send_keys(passw)
94-
time.sleep(3)
95-
browser.execute_script(
96-
"arguments[0].click();",
97-
browser.find_element(By.XPATH, '//*[@id="frmCheckout"]/p[1]/label/div/ins'),
98-
)
73+
page = ChromiumPage()
74+
page.get("https://www.exitlag.com/register")
75+
page.ele('#inputFirstName').input("qing")
76+
page.ele('#inputLastName').input("chy")
77+
page.ele('#inputEmail').input(email)
78+
page.ele('#inputNewPassword1').input(passw)
79+
page.ele('#inputNewPassword2').input(passw)
80+
element = page.ele('.icheck-button')
81+
element.click()
82+
element = page.ele('.btn btn-primary btn-line fw-500 font-18 py-2 w-100 btn-recaptcha btn-recaptcha-invisible')
83+
element.click()
84+
if wait_until_url(page, "https://www.exitlag.com/register-success", timeout=60):
9985
time.sleep(2)
100-
browser.execute_script(
101-
"arguments[0].click();",
102-
browser.find_element(By.XPATH, '//*[@id="frmCheckout"]/p[2]/input'),
103-
)
104-
try:
105-
element = WebDriverWait(driver=browser, timeout=60).until(
106-
EC.presence_of_element_located(
107-
(By.XPATH, '//*[@id="main-body"]/div[1]/section/div/div/h2')
108-
)
109-
)
110-
except Exception:
111-
print("XPath not found.")
112-
finally:
113-
msg = request.get(
114-
f"https://api.{maildomain}/messages",
115-
params={"page": "1"},
116-
headers={"Authorization": f"Bearer {token}"},
117-
).json()
118-
if (
119-
msg["hydra:member"][0]["intro"]
120-
== "Hello and welcome qing! You are now a step away from getting the best communications to improve your gameplay and get rid of…"
121-
):
122-
msgid = msg["hydra:member"][0]["id"]
123-
else:
124-
msgid = msg["hydra:member"][1]["id"]
125-
fullmsg = request.get(
126-
f"https://api.{maildomain}/messages/{msgid}",
127-
params={"id": f"{msgid}"},
128-
headers={"Authorization": f"Bearer {token}"},
129-
).json()
130-
link = re.findall(
131-
r"http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+",
132-
fullmsg["text"],
133-
)[0]
134-
browser.get(f"{link}")
135-
try:
136-
element = WebDriverWait(driver=browser, timeout=60).until(
137-
EC.presence_of_element_located(
138-
(By.XPATH, '//*[@id="main-body"]/div[1]/section/div/div/h2')
139-
)
140-
)
141-
except Exception:
142-
print("XPath not found.")
143-
finally:
144-
browser.quit()
145-
print(f"Your email address: {email}\nYour password: {passw}\n")
146-
print("Have fun using ExitLag!")
147-
exit()
86+
msg = request.get(
87+
f"https://api.{maildomain}/messages",
88+
params={"page": "1"},
89+
headers={"Authorization": f"Bearer {token}"},
90+
).json()
91+
if (
92+
msg["hydra:member"][0]["intro"]
93+
== "Hello and welcome qing! You are now a step away from getting the best communications to improve your gameplay and get rid of…"
94+
):
95+
msgid = msg["hydra:member"][0]["id"]
96+
else:
97+
msgid = msg["hydra:member"][1]["id"]
98+
fullmsg = request.get(
99+
f"https://api.{maildomain}/messages/{msgid}",
100+
params={"id": f"{msgid}"},
101+
headers={"Authorization": f"Bearer {token}"},
102+
).json()
103+
link = re.findall(
104+
r"http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+",
105+
fullmsg["text"],
106+
)[0]
107+
page.get(f"{link}")
108+
time.sleep(5)
109+
page.quit()
110+
print(f"Your email address: {email}\nYour password: {passw}\n")
111+
print("Have fun using ExitLag!")
112+
exit()

0 commit comments

Comments
 (0)