{"id":21588803,"url":"https://github.com/theyka/turnstile-solver","last_synced_at":"2025-04-05T19:09:01.395Z","repository":{"id":259070809,"uuid":"876247238","full_name":"Theyka/Turnstile-Solver","owner":"Theyka","description":"Python-based turnstile solver using the patchright library, featuring multi-threaded execution, API integration, and support for different browsers.","archived":false,"fork":false,"pushed_at":"2025-04-02T17:21:53.000Z","size":162,"stargazers_count":213,"open_issues_count":2,"forks_count":43,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-05T19:08:56.581Z","etag":null,"topics":["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"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Theyka.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-21T16:38:09.000Z","updated_at":"2025-04-05T14:43:06.000Z","dependencies_parsed_at":"2025-02-15T09:25:09.441Z","dependency_job_id":"f19dcb15-636c-4fd0-8ce2-a97d3dee8b42","html_url":"https://github.com/Theyka/Turnstile-Solver","commit_stats":null,"previous_names":["theyka/turnstile-solver"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Theyka%2FTurnstile-Solver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Theyka%2FTurnstile-Solver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Theyka%2FTurnstile-Solver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Theyka%2FTurnstile-Solver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Theyka","download_url":"https://codeload.github.com/Theyka/Turnstile-Solver/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247386263,"owners_count":20930618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["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"],"created_at":"2024-11-24T16:11:15.781Z","updated_at":"2025-04-05T19:09:01.384Z","avatar_url":"https://github.com/Theyka.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n \n  \u003ch2 align=\"center\"\u003eCloudflare - Turnstile Solver\u003c/h2\u003e\n  \u003cp align=\"center\"\u003e\nA Python-based Turnstile solver using the patchright library, featuring multi-threaded execution, API integration, and support for different browsers. It solves CAPTCHAs quickly and efficiently, with customizable configurations and detailed logging.\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/Theyka/Turnstile-Solver#-changelog\"\u003e📜 ChangeLog\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/Theyka/Turnstile-Solver/issues\"\u003e⚠️ Report Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/Theyka/Turnstile-Solver/issues\"\u003e💡 Request Feature\u003c/a\u003e\n  \u003c/p\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/LICENSE-CC%20BY%20NC%204.0-red?style=for-the-badge\"/\u003e\n    \u003cimg src=\"https://img.shields.io/github/stars/Theyka/Turnstile-Solver.svg?style=for-the-badge\u0026color=red\"/\u003e\n    \u003cimg src=\"https://img.shields.io/github/issues/Theyka/Turnstile-Solver?style=for-the-badge\u0026color=red\"/\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n---\n\n### 🎁 Donation\n\n- **USDT (TRC20)**: ``TWXNQCnJESt6gxNMX5oHKwQzq4gsbdLNRh``\n- **USDT (Arbitrum One)**: ``0xd8fd1e91c8af318a74a0810505f60ccca4ca0f8c``\n- **BTC**:\n``1AbiR2YaCzvmy9itMAJqHejYYENtogDr78``\n- **LTC**: ``LSrLQe2dfpDhGgVvDTRwW72fSyC9VsXp9g``\n\n---\n\n### ❗ Disclaimers\n- I am not responsible for anything that may happen, such as API Blocking, IP ban, etc.\n- This was a quick project that was made for fun and personal use if you want to see further updates, star the repo \u0026 create an \"issue\" [here](https://github.com/Theyka/Turnstile-Solver/issues/)\n\n---\n\n### ⚙️ Installation Instructions\n\n1. **Ensure Python 3.8+ is installed** on your system.\n\n2. **Create a Python virtual environment**:\n   ```bash\n   python -m venv venv\n   ```\n\n3. **Activate the virtual environment**:\n   - On **Windows**:\n     ```bash\n     venv\\Scripts\\activate\n     ```\n   - On **macOS/Linux**:\n     ```bash\n     source venv/bin/activate\n     ```\n\n4. **Install required dependencies**:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n5. **Select the browser to install**:\n   You can choose between **Chromium**, **Chrome**, **Edge** or **Camoufox**:\n   - To install **Chromium**:\n     ```bash\n     python -m patchright install chromium\n     ```\n   - To install **Chrome**:\n     - On **macOS/Windows**: [Click here](https://www.google.com/chrome/)  \n     - On **Linux (Debian/Ubuntu-based)**:\n       ```bash\n       apt update\n       wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb\n       apt install -y ./google-chrome-stable_current_amd64.deb\n       apt -f install -y  # Fix dependencies if needed\n       rm ./google-chrome-stable_current_amd64.deb\n       ```\n   - To install **Edge**:\n     ```bash\n     python -m patchright install msedge\n     ```\n   - To install **Camoufox**:\n     ```bash\n     python -m camoufox fetch\n     ```\n\n6. **Start testing**:\n   - Run the script (Check [🔧 Command line arguments](#-command-line-arguments) for better setup):\n     ```bash\n     python api_solver.py\n     ```\n     \n---\n\n### 🔧 Command line arguments\n| Parameter     | Default   | Type      | Description                                                                                   |\n|--------------|-----------|-----------|-----------------------------------------------------------------------------------------------|\n| `--headless`   | `False`  | `boolean` | Runs the browser in headless mode. Requires the `--useragent` argument to be set.             |\n| `--useragent`  | `None`   | `string`  | Specifies a custom User-Agent string for the browser. (No need to set if camoufox used)                                        |\n| `--debug`      | `False`  | `boolean` | Enables or disables debug mode for additional logging and troubleshooting.                   |\n| `--browser_type` | `chromium`  | `string` | Specify the browser type for the solver. Supported options: chromium, chrome, msedge, camoufox      |\n| `--thread`     | `1`      | `integer` | Sets the number of browser threads to use in multi-threaded mode.                           |\n| `--host`       | `127.0.0.1` | `string`  | Specifies the IP address the API solver runs on.                                            |\n| `--port`       | `5000`   | `integer` | Sets the port the API solver listens on.                                                    |\n| `--proxy`       | `False`   | `boolean` | Select a random proxy from proxies.txt for solving captchas                                                   |\n\n---\n\n### 🐳 Docker Image\n#### Running the Container\nTo start the container, use:\n- Change the TZ environment variable and ports to the correct one for yourself:\n```sh\ndocker run -d -p 3389:3389 -p 5000:5000 -e TZ=Asia/Baku --name turnstile_solver theyka/turnstile_solver:latest\n```\n\n#### Connecting to the Container\n1. Use an **RDP client** (like Windows Remote Desktop, Remmina, or FreeRDP)\n2. Connect to `localhost:3389`\n3. Login with the default user:\n   - **Username:** root\n   - **Password:** root\n4. After this, you can start the solver by navigating to the `Turnstile-Solver` folder.\n\n---\n\n### 📡 API Documentation\n#### Solve turnstile\n```http\n  GET /turnstile?url=https://example.com\u0026sitekey=0x4AAAAAAA\n```\n#### Request Parameters:\n| Parameter  | Type    | Description                                                                 | Required |\n|------------|---------|-----------------------------------------------------------------------------|----------|\n| `url`      | string  | The target URL containing the CAPTCHA. (e.g., `https://example.com`) | Yes      |\n| `sitekey`  | string  | The site key for the CAPTCHA to be solved. (e.g., `0x4AAAAAAA`) | Yes      |\n| `action`   | string  | Action to trigger during CAPTCHA solving, e.g., `login`            | No       |\n| `cdata`    | string  | Custom data that can be used for additional CAPTCHA parameters.    | No       |\n\n#### Response:\n\nIf the request is successfully received, the server will respond with a `task_id` for the CAPTCHA solving task:\n\n```json\n{\n  \"task_id\": \"d2cbb257-9c37-4f9c-9bc7-1eaee72d96a8\"\n}\n```\n\n#### Get Result\n```http\n  GET /result?id=f0dbe75b-fa76-41ad-89aa-4d3a392040af\n```\n\n#### Request Parameters:\n\n| Parameter  | Type    | Description                                                                 | Required |\n|------------|---------|-----------------------------------------------------------------------------|----------|\n| `id`       | string  | The unique task ID returned from the `/turnstile` request.                   | Yes      |\n\n#### Response:\n\nIf the CAPTCHA is solved successfully, the server will respond with the following information:\n\n```json\n{\n  \"elapsed_time\": 7.625,\n  \"value\": \"0.KBtT-r\"\n}\n```\n\n---\n\n### 🎉 Sponsor\n\u003ca href=\"https://dashboard.capsolver.com/passport/register?inviteCode=7_Dvkat0RVqc\"\u003e\n    \u003cimg src=\"https://github.com/user-attachments/assets/176d2a43-2d08-4aa6-bc9d-5e1eb5c3d1a4\" alt=\"Description\"\u003e\n\u003c/a\u003e\n\n---\n\nInspired by [Turnaround](https://github.com/Body-Alhoha/turnaround)\nOriginal code by [Theyka](https://github.com/Theyka/Turnstile-Solver)\nChanges by [Sexfrance](https://github.com/sexfrance)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheyka%2Fturnstile-solver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheyka%2Fturnstile-solver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheyka%2Fturnstile-solver/lists"}