{"id":15036184,"url":"https://github.com/openbullet/captchasharp","last_synced_at":"2025-04-05T12:04:18.211Z","repository":{"id":40876057,"uuid":"254264987","full_name":"openbullet/CaptchaSharp","owner":"openbullet","description":".NET universal interface for the Web APIs of all major captcha solving services","archived":false,"fork":false,"pushed_at":"2024-08-12T20:31:38.000Z","size":734,"stargazers_count":105,"open_issues_count":13,"forks_count":24,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-05T12:04:13.837Z","etag":null,"topics":["captcha","captcha-bypass","captcha-solver","captcha-solving","csharp","csharp-lib","csharp-library","funcaptcha","hcaptcha","recaptcha","recaptcha-v2","recaptcha-v3","turnstile"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openbullet.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":"2020-04-09T03:47:39.000Z","updated_at":"2025-04-04T18:45:49.000Z","dependencies_parsed_at":"2024-09-24T20:30:29.480Z","dependency_job_id":null,"html_url":"https://github.com/openbullet/CaptchaSharp","commit_stats":{"total_commits":147,"total_committers":5,"mean_commits":29.4,"dds":0.08843537414965985,"last_synced_commit":"54179ab847b2d1f9c34675ba4a4ebab5d013bee7"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openbullet%2FCaptchaSharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openbullet%2FCaptchaSharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openbullet%2FCaptchaSharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openbullet%2FCaptchaSharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openbullet","download_url":"https://codeload.github.com/openbullet/CaptchaSharp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332560,"owners_count":20921853,"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-bypass","captcha-solver","captcha-solving","csharp","csharp-lib","csharp-library","funcaptcha","hcaptcha","recaptcha","recaptcha-v2","recaptcha-v3","turnstile"],"created_at":"2024-09-24T20:30:26.147Z","updated_at":"2025-04-05T12:04:18.193Z","avatar_url":"https://github.com/openbullet.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CaptchaSharp\nA .NET library that implements the APIs of the most used **captcha solving services** out there.\nThe library is fully documented, asynchronous and very easy to use.\n\nAll services derive from the same `CaptchaService` class and have the same code API, so it's very easy to switch between services!\n\n## Supported Services\nThis library supports the following captcha solving services\n- [2captcha.com](https://2captcha.com/)\n- [anti-captcha.com](https://anti-captcha.com/)\n- [deathbycaptcha.com](https://deathbycaptcha.com/)\n- [imagetyperz.com](https://www.imagetyperz.com/)\n- [capmonster.cloud](https://capmonster.cloud/)\n- [captchacoder.com](https://captchacoder.com/)\n- [humancoder.com](https://humancoder.com/)\n- [azcaptcha.com](https://azcaptcha.com/)\n- [captchas.io](https://captchas.io/)\n- [9kw.eu](https://www.9kw.eu/)\n- [truecaptcha.com](https://truecaptcha.com/)\n- [rucaptcha.com](https://rucaptcha.com/)\n- [nopecha.com](https://nopecha.com/)\n- [nocaptchaai.com](https://nocaptchaai.com/)\n- [metabypass.tech](https://metabypass.tech/)\n- [captchaai.com](https://captchaai.com/)\n- [nextcaptcha.com](https://nextcaptcha.com/)\n- [ez-captcha.com](https://ez-captcha.com/)\n- [endcaptcha.com](https://endcaptcha.com/)\n- [bestcaptchasolver.com](https://bestcaptchasolver.com/)\n- [solvecaptcha.net](https://solvecaptcha.net/)\n- [cap.guru](https://cap.guru/)\n- [aycd.io](https://aycd.io/)\n- [capsolver.com](https://capsolver.com/)\n\n## Supported Captcha Types\nThis library supports the following captcha types\n- Text (with language options)\n- Image (with options like phrase, case sensitivity, calculations)\n- ReCaptcha v2 (incl. invisible, enterprise)\n- ReCaptcha v3 (incl. enterprise)\n- ArkoseLabs FunCaptcha\n- HCaptcha (incl. invisible, enterprise)\n- KeyCaptcha\n- GeeTest v3\n- GeeTest v4\n- Capy\n- DataDome\n- Cloudflare Turnstile\n- Cloudflare Challenge page\n- Lemin Cropped\n- Amazon WAF\n- Cyber SiARA\n- MT Captcha\n- CutCaptcha\n- Friendly Captcha\n- atb Captcha\n- Tencent Captcha\n- Audio Captcha (with language options)\n- ReCaptcha Mobile\n\nAdditional supported features:\n- Proxies\n- User-Agent\n- Cookies\n\n## Availability Table\n\n![Availability Table Logo](availability_table_logo.png?raw=true)\n\n**Not every captcha type is supported by each service! You can find a spreadsheet with a breakdown of the supported captcha types for each implemented service at the link below**\n\n[CaptchaSharp Services Availability](https://1drv.ms/x/s!Al8HxSfx2JL3ePfRK23aUt34eCk?e=WNCPh9)\n\n## Adding CaptchaSharp to your project\nSimply install the nuget package via\n\n`Install-Package CaptchaSharp`\n\n## Usage\nFirst of all, initialize your solver of choice by providing your credentials, for example\n```csharp\nCaptchaService service = new TwoCaptchaService(\"MY_API_KEY\");\n```\n\nYou can get your remaining balance like this\n```csharp\ndecimal balance = await service.GetBalanceAsync();\n```\n\nIf the provided credentials are wrong, the method above will return a `BadAuthenticationException`.\n\nIf the credentials are correct and the balance is greater than the minimum required for solving a captcha, you can proceed to solve a captcha (e.g., a ReCaptchaV2 task) like this.\n\n```csharp\nStringResponse solution = await service.SolveRecaptchaV2Async(\"site key\", \"site url\");\n```\n\nThe method above can throw the following exceptions:\n- `TaskCreationException` when the task could not be created, for example due to zero balance or incorrect parameters.\n- `TaskSolutionException` when the task could not be completed, for example when an image captcha cannot be decoded.\n- `TimeoutException` when the captcha solution took too long to complete.\n\nYou can configure a custom timeout like this\n\n```csharp\nservice.Timeout = TimeSpan.FromMinutes(3);\n```\n\nThe returned solution will contain two fields:\n\n-   an `Id` which you can use for reporting a bad solution (if the service supports it) like this\n    ```csharp\n    await service.ReportSolutionAsync(solution.Id, CaptchaType.ReCaptchaV2);\n    ```\n    if the report failed, the method above will throw a `TaskReportException`.\n\n\n-   your solution as plaintext\n    ```csharp\n    Console.WriteLine($\"The solution is {solution.Response}\");\n    ```\n\nIf a method or some of its parameters are not supported, a `NotSupportedException` or `ArgumentException` will be thrown.\n\n## Proxy, User-Agent, and Cookies\nSome services and captcha types can accept additional parameters, like a proxy, user-agent, or cookies.\n\n```csharp\nvar sessionParams = new SessionParams\n{\n    Proxy = new Proxy(\n        host: \"proxy.example.com\",\n        port: 8080,\n        type: ProxyType.HTTP,\n        username: \"proxy_username\", // optional\n        password: \"proxy_password\" // optional\n    ),\n    UserAgent = \"Mozilla/5.0 ...\", // make sure to use an up-to-date user-agent\n    Cookies = new Dictionary\u003cstring, string\u003e\n    {\n        { \"cookie_name_1\", \"cookie_value_1\" },\n        { \"cookie_name_2\", \"cookie_value_2\" }\n    }\n};\n\n// Solve a captcha with session parameters\nStringResponse solution = await service.SolveRecaptchaV2Async(\n    \"site key\", \"site url\", sessionParams: sessionParams);\n\nConsole.WriteLine($\"The solution is {solution.Response}\");\n```\n\nAll session parameters are optional, and you can provide only the ones you need.\n\n## The service I want to use is not implemented\nIf the service you want to use is not implemented, you can easily implement it yourself by deriving from the `CaptchaService` class and implementing the abstract methods, or you can open an issue, and we will try to implement it as soon as possible.\n\n## Unit Tests\nUnit tests are included in the `CaptchaSharp.Tests` project. In order to test, you need to:\n1. Run any test once and let it fail. It will create a file called `config.json` in your `bin/Debug/net8.0` folder.\n2. Add your credentials to the `config.json` file. You can also add a proxy to test proxied endpoints.\n3. Run the tests (one at a time, to avoid overloading the service and overspending).\n4. If you need to test a captcha on a specific website, you can edit the `ServiceTests` class and change the parameters as you need.\n\n## What needs to be improved\n- Drop `Newtonsoft.Json` for `System.Text.Json`\n- Implement better exception handling for specific error codes. For example when there is zero balance or when a solver method returns a bad authentication, they will currently fall in the generic `TaskCreationException` type.\n- Add support for recognition APIs (right now only token-based APIs are supported).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenbullet%2Fcaptchasharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenbullet%2Fcaptchasharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenbullet%2Fcaptchasharp/lists"}