Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/theyka/turnstile-solver

Simple turnstile solver by using patchright and python
https://github.com/theyka/turnstile-solver

captcha captcha-solver captcha-solver-api captcha-solver-turnstile cloudflare cloudflare-turnstile cloudflare-turnstile-bypass cloudflare-turnstile-captcha-solver cloudflare-turnstile-solver solver turnstile turnstile-bypass turnstile-captcha-solver turnstile-solver

Last synced: 29 days ago
JSON representation

Simple turnstile solver by using patchright and python

Awesome Lists containing this project

README

        



Cloudflare - Turnstile Solver



A Python-based solution for solving Cloudflare Turnstile challenges quickly (4-6 seconds solve time). The script uses patchright library to interact with web pages and solve the challenges without running additional browser instances.




๐Ÿ“œ ChangeLog
ยท
โš ๏ธ Report Bug
ยท
๐Ÿ’ก Request Feature


### โš™๏ธ Installation

- Requires: `Python 3.8+`
- Make a python virtual environment: `python3 -m venv venv`
- Source the environment: `venv\Scripts\activate` (Windows) / `source venv/bin/activate` (macOS, Linux)
- Install the requirements: `pip install -r requirements.txt`
- Install chrominium: `patchright install chromium` / `python -m patchright install chromium`
- Start: `Remove comments for testing in async and sync python files then run those`

---

### ๐Ÿ”ฅ Features

- **Debug Logging**: Detailed debug logs track actions and progress, making troubleshooting straightforward.
- **Automated CAPTCHA Solver**: Uses Playwright to launch a browser, navigate to the target page, and dynamically injects a CAPTCHA solver.
- **Customizable Browser Context**: Sets browser options like headless mode, sandboxing, and disabling unnecessary features to optimize performance.
- **Responsive CAPTCHA Interaction**: Adjusts CAPTCHA display, clicks on it, and retrieves the response through repeated attempts if necessary.
- **Timeout and Retries**: Implements a retry loop with configurable timeouts, ensuring robust attempts to retrieve the CAPTCHA token.
- **Elapsed Time Tracking**: Logs and returns elapsed time for solving CAPTCHA, providing an efficiency metric.
- **Error Handling**: Returns detailed status messages on success or failure, allowing for straightforward integration and feedback.

---

#### ๐Ÿ“น Preview

![Preview](https://i.imgur.com/YI6RZ5P.gif)

---

### โ— Disclaimers

- I am not responsible for anything that may happen, such as API Blocking, IP ban, etc.
- This was a quick project that was made for fun and personal use if you want to see further updates, star the repo & create an "issue" [here](https://github.com/Theyka/Turnstile-Solver/issues/)

---

### ๐Ÿ“œ ChangeLog

```diff
v0.0.1 โ‹ฎ 21/10/2024
! Initial release

v0.0.2 โ‹ฎ 10/28/2024
! Modified the script, page.html is now in the scripts
! Made it faster and less resource intensive
! Modified the sync logic and made an async version
! Implemented logmagix logging
! Added timer

v0.0.3 โ‹ฎ 11/7/2024
+ Added API server implementation
+ Added web interface for API documentation
+ Improved error handling and logging
+ Added concurrent processing support
```

---





Inspired by [Turnaround](https://github.com/Body-Alhoha/turnaround)
Original code by [Theyka](https://github.com/Theyka/Turnstile-Solver)
Changes by [Sexfrance](https://github.com/sexfrance)