Skip to content

Commit

Permalink
General update
Browse files Browse the repository at this point in the history
  • Loading branch information
qing762 committed Dec 14, 2024
1 parent 7942d27 commit e0e1b45
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if (Test-Path requirements.txt) { pip install -r requirements.txt }
shell: pwsh

- name: Lint with flake8
run: |
Expand Down
7 changes: 4 additions & 3 deletions lib/bypass.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import time
from DrissionPage import ChromiumPage


class CloudflareBypasser:
def __init__(self, driver: ChromiumPage, max_retries=-1, log=True):
self.driver = driver
Expand Down Expand Up @@ -37,7 +38,7 @@ def search_recursively_shadow_root_with_cf_input(self, ele):
except Exception as e:
self.log_message(f"Error searching shadow root with CF input: {e}")
return None

def locate_cf_button(self):
try:
button = None
Expand All @@ -47,7 +48,7 @@ def locate_cf_button(self):
if "turnstile" in ele.attrs["name"] and ele.attrs["type"] == "hidden":
button = ele.parent().shadow_root.child()("tag:body").shadow_root("tag:input")
break

if button:
return button
else:
Expand Down Expand Up @@ -104,4 +105,4 @@ def bypass(self):
if self.is_bypassed():
self.log_message("Bypass successful.")
else:
self.log_message("Bypass failed.")
self.log_message("Bypass failed.")
3 changes: 1 addition & 2 deletions lib/lib.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import string
import random
import toml
import asyncio
import platform


class Main:
Expand Down Expand Up @@ -44,5 +42,6 @@ async def switchDomain(maildomain, externaldomain):
)
return externaldomain


if __name__ == "__main__":
print("This is a library file. Please run main.py instead.")
7 changes: 4 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

warnings.filterwarnings("ignore", category=TqdmExperimentalWarning)


async def main():

port = ChromiumOptions().auto_port()
Expand All @@ -29,7 +30,7 @@ async def main():
)
print()
executionCount = int(executionCount) if executionCount.isdigit() else 1

for x in range(executionCount):
bar = tqdm(total=100)
bar.set_description(f"Initial setup completed [{x + 1}/{executionCount}]")
Expand Down Expand Up @@ -142,7 +143,7 @@ async def main():
bar.update(20)
tab.get(link)

bar.set_description(f"Clearing cache and data")
bar.set_description("Clearing cache and data")
bar.update(9)
tab.set.cookies.clear()
tab.clear_cache()
Expand Down Expand Up @@ -177,4 +178,4 @@ async def main():
print("\033[0m" "\nCredentials saved to accounts.txt\nHave fun using ExitLag!")

if __name__ == "__main__":
asyncio.run(main())
asyncio.run(main())

0 comments on commit e0e1b45

Please sign in to comment.