{"id":18078159,"url":"https://github.com/noahcardoza/captchaharvester","last_synced_at":"2025-05-16T10:07:57.299Z","repository":{"id":37853563,"uuid":"253452456","full_name":"NoahCardoza/CaptchaHarvester","owner":"NoahCardoza","description":"Solve captchas yourself without having to pay for services like 2captcha for use in automated projects.","archived":false,"fork":false,"pushed_at":"2023-05-09T13:24:39.000Z","size":1057,"stargazers_count":667,"open_issues_count":9,"forks_count":63,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-05-16T10:07:47.562Z","etag":null,"topics":["hacktoberfest","recaptcha","sneakerbot","solve-captchas"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/captcha-harvester/","language":"Python","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/NoahCardoza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["NoahCardoza"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://www.buymeacoffee.com/noahcardoza"]}},"created_at":"2020-04-06T09:32:17.000Z","updated_at":"2025-05-13T01:38:27.000Z","dependencies_parsed_at":"2024-01-14T04:40:03.539Z","dependency_job_id":"421a8cfa-b42a-4120-9bdd-d9d008e92527","html_url":"https://github.com/NoahCardoza/CaptchaHarvester","commit_stats":{"total_commits":193,"total_committers":6,"mean_commits":"32.166666666666664","dds":"0.24870466321243523","last_synced_commit":"044ffa2d1a09d31ca080cc5cc14c5897fb33c8f7"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoahCardoza%2FCaptchaHarvester","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoahCardoza%2FCaptchaHarvester/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoahCardoza%2FCaptchaHarvester/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoahCardoza%2FCaptchaHarvester/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NoahCardoza","download_url":"https://codeload.github.com/NoahCardoza/CaptchaHarvester/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254509477,"owners_count":22082891,"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":["hacktoberfest","recaptcha","sneakerbot","solve-captchas"],"created_at":"2024-10-31T12:12:58.945Z","updated_at":"2025-05-16T10:07:52.290Z","avatar_url":"https://github.com/NoahCardoza.png","language":"Python","funding_links":["https://github.com/sponsors/NoahCardoza","https://www.buymeacoffee.com/noahcardoza"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/NoahCardoza/CaptchaHarvester/blob/master/logo.png\"\u003e\n  \u003cbr/\u003e\n  \u003cimg src=\"https://forthebadge.com/images/badges/made-with-python.svg\"\u003e\n  \u003cimg src=\"https://forthebadge.com/images/badges/does-not-contain-msg.svg\"\u003e\n  \u003cbr/\u003e\n  \u003ca href=\"https://github.com/NoahCardoza/CaptchaHarvester/graphs/commit-activity\"\u003e\u003cimg alt=\"Maintenance\" src=\"https://img.shields.io/badge/Maintained%3F-yes-green.svg?style=for-the-badge\"\u003e\u003c/a\u003e\n\u003ca href=\"https://pypi.python.org/pypi/captcha-harvester/\"\u003e\u003cimg alt=\"PyPI Python Versions\" src=\"https://img.shields.io/pypi/pyversions/captcha-harvester.svg?style=for-the-badge\"\u003e\u003c/a\u003e\n\u003ca href=\"https://pepy.tech/project/captcha-harvester\"\u003e\u003cimg alt=\"PyPI - Downloads\" src=\"https://img.shields.io/pypi/dm/captcha-harvester?style=for-the-badge\"\u003e\u003c/a\u003e\n  \u003cbr/\u003e\n  \u003ca target=\"_blank\" href=\"https://discord.gg/aAdY5x9arY\"\u003e\u003cimg alt=\"Discord\" src=\"https://img.shields.io/discord/727664815316926565.svg?label=Discord\u0026logo=Discord\u0026colorB=7289da\u0026style=for-the-badge\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# 2captcha Alternatives\n\n## [CapSolver.com](https://dashboard.capsolver.com/passport/register?inviteCode=45JrWKeetsQa)\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://dashboard.capsolver.com/passport/register?inviteCode=45JrWKeetsQa\"\u003e\n    \u003cimg src=\"https://i.imgur.com/YaRmSt4.gif\" alt=\"Capsolver's Banner\" style=\"width: 100%;\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ca href=\"https://dashboard.capsolver.com/passport/register?inviteCode=45JrWKeetsQa\"\u003eCapsolver\u003c/a\u003e offers an affordable and quick automatic captcha solving solution with a success rate of 99.15% and the ability to solve a variety of captchas, including reCAPTCHA V2, hCaptcha, FunCaptcha, and more. Integration with various API clients is also supported, and a free trial balance is available with upgraded personal details.\n\n\n# CaptchaHarvester\n\n\u003e Solve captchas yourself without having to pay for services like 2captcha for use in automated projects.\n\n## ~~v3 Is On The Way!~~\n\n~~Since the last commit to this repo I've been working hard on v3. This is a big leap full of \nslick features that make it a breeze to start harvesting captchas anywhere!~~\n\n~~Go checkout first draft of the [docs](https://noahcardoza.github.io/harvester-docs/) and see for yourself!~~\n\n~~If you are interested in beta testing or pricing, contact me via Discord.~~\n\n## Update (05/06/2022)\n\nAs of late I have been too busy with school, work, and life to continue developement on this project. I hope to get back to some day but until then, well-written PRs are more than welcome to add features, fix bugs, or improve the useability of the harvester!\n\n## Discord\n\nIf you need help feel free to swing by my [Discord](https://discord.gg/aAdY5x9arY)!\n\n## Use Cases\n\nThis project allows you to solve Google's V2 and V3 ReCaptchas as well as\nhCaptchas. However, since Google's V3 ReCaptchas are based on a rating\nsystem of your browser and browsing habits, it's slightly less reliable.\n\n### [CloudProxy](https://github.com/NoahCardoza/CloudProxy)\n\nThis project is also natively supported by a newer project of mine which allows you to bypass\nCloudflare's Bot Detection. It's super simlpe to setup, just follow the instructions [here](https://github.com/NoahCardoza/CloudProxy#harvester).\n\n## Setup\n\n### PyPi\n\n```bash\npip install captcha-harvester\n```\n\nIf you'd like to subscribe to the latest updates, you can do so [here](https://libraries.io/subscribe/4946088)!\n\n### The `dev` Branch\n\nSometimes there will be updates I'm working on that won't be pushed to the master branch/PyPi\nbecause I haven't had time to test them. Sometimes these patches will fix problems you experience\nin the stable branch, but if things get buggy don't be surprised.\n\n```bash\npip install https://github.com/NoahCardoza/CaptchaHarvester/archive/dev.zip\n```\n\n## Usage\n\n## \u003e harvester\n\nThis will setup an HTTP server at `https://127.0.0.1:5000` by default.\n\nIf you are running MacOS/Windows and have the [Google Chrome](https://www.google.com/chrome/), all you have to do is pass\nthe the harvester will launch without a hitch! It will automatically open\na new instance of Chrome under a temporary profile with and map the `domain` to the\nlocal server.\n\n**NOTE**: Without the `-b/--browser` only the server will start up, without the browser. You won't\nbe able to access the site correctly on your normal browsers because the host won't be correctly\nmapped to the local server. This could be useful if you want to open the browser with your own\ncommand line options or you already have one running from a previous session.\n\n\u003e If you would like to come up with an automated solution for your OS, I am open to PR requests.\n\n```text\n\u003e harvester -h\nusage: harvester.py [-h] [-a DATA_ACTION] -k SITE_KEY -d DOMAIN [-H HOST]\n                    [-p PORT] [-b BROWSER] [-B] [-r] [-e LOAD_EXTENSION] [-v]\n                    {recaptcha-v2,recaptcha-v3,hcaptcha}\n\nCaptchaHarvester: Solve captchas yourself without having to pay for services\nlike 2captcha for use in automated projects.\n\npositional arguments:\n  {recaptcha-v2,recaptcha-v3,hcaptcha}\n                        The type of captcha that that that domain/sitekey pair\n                        is for.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -a DATA_ACTION, --data-action DATA_ACTION\n                        Sets the action in rendered recaptcha-v3 when\n                        collecting tokens (required with recaptcha-v3)\n  -k SITE_KEY, --site-key SITE_KEY\n                        The sitekey used by the captcha.\n  -d DOMAIN, --domain DOMAIN\n                        The domain of the site which hosts the captcha you\n                        want to solve.\n  -H HOST, --host HOST  Defaults to 127.0.0.1.\n  -p PORT, --port PORT  Defaults to 5000.\n  -b BROWSER, --browser BROWSER\n                        Allows you to pass the path to any Chromium browser.\n  -B, --no-browser      Keeps the harvester from launching a browser br\n                        default.\n  -r, --restart-browser\n                        If this flag is not passed, a new instance of the\n                        browser will be opened. this flag is most helpful when\n                        solving Googles ReCaptchas because if you restat your\n                        main profile you'll most likely be logged into Google\n                        and will be given an easier time on the captchas.\n  -e LOAD_EXTENSION, --load-extension LOAD_EXTENSION\n                        Loads unpacked extensions when starting the browser,\n                        to load multiple extensions sepparate the paths with\n                        commas (must be used with -b/--browser).\n  -v, --verbose         Show more server and browser (when using -b/--browser)\n                        logging.\n\nFor help contact @MacHacker#8396 (Discord)\n```\n\n## Configuring The Browser\n\nWhen accessing the server to collect the tokens you have to do it the right way and you can't connect to it\njust like any old server. You configure your browser to think that the server is actually the site we want\nto collect captcha tokens for\n\n### How do we do this the EASY way?\n\nLuckily, the easy way is pretty easy. You literally have to do nothing! However, this only works on Mac/Windows (Linux\nsupport coming soon). Additionally, you can pass the path to a **Chromium** browser binary/`.exe` or a browser\nthat can be found in your $PATH envrionment variable through the `-b/--browser`.\n\nWhen using the `-b`, a browser instance will be lanuched that's totally disconnected from your main Profile\n(unless you pass `-r`, which *MIGHT* be buggy on Windows).\n\n**NOTE**: The way the harvester is currently setup, if you use the `-b` flag to start up the browser, then when you quit either the browser or the server, the other will also terminate.\n\n### How do we do this the HARD way?\n\nMainly through the use on the `--host-rules` Chromium flag. Here's an example:\n\n```bash\n--host-rules=\"MAP example.com 127.0.0.1:5000\"\n```\n\nBasically this sets the DNS record for `example.com` to `127.0.0.1:5000` rather than querying a DNS server\nfor the actual IP of the real site. This helps us trick the captcha provider into thinking that the captcha\nis actually being loaded on their client's.\n\nThere are a few other arguments the harvester uses to make things easier and simpler which can be found in\n[/harvester/browser.py](https://github.com/NoahCardoza/CaptchaHarvester/blob/master/harvester/browser.py).\n\nIf for some reason you don't want a browser launched on the start of the harvester or you want to configure it\nyouself, all you have to do is pass the `-b/--no-browser` flag.\n\n## Solveing V2 Captchas with [Buster](https://github.com/dessant/buster)\n\nYou might find it useful to use [Buster](https://github.com/dessant/buster) when solving V2 Captchas.\nYou can clone and build the extension for chrome, and then pass the path of the built extension\nto harvester with the `-e/--load-extension` flag.\n\n## ReCaptcha: V2 vs. V3\n\nWhen solving Google's v3 captchas, you should login to a Google Account first. The v3 captcha's\nwork of a raiting system of your browsing habits. They are a little finicky compared to their v2\npredecessors. If the tokens stop working, you should start using a different Google Account or\nwait a little bit between reloading the captcha harvester page.\n\nAdditonally, V3 ReCaptcha's require an action when submitting the captcha. Sometimes they don't\nmatter if the target site dosen't double check them and you can get away passing anything to (-a/--data-action).\nHowever, it is advised that you grab the correct `data-action` attribute when looking for the sitekey, they\nshould be near each other.\n\n## How do I use the tokens of the captcha's I solve?\n\n### API\n\nIn most cases you'll probably want to use the API to fetch the tokens.\n\n#### Python\n\nIf you want to access the tokens with a Python script, you are in luck! I've included a handy\nwrapper for the API which makes things really simple. Just take a look at this example:\n\n```python\nfrom harvester import fetch\n\n# assuming we ran: harvester recaptcha-v2 -d guerrillamail.com -k 6LcIHdESAAAAALVQtprzwjt2Rq722tkxk-RDQ0aN\ntoken = fetch.token('guerrillamail.com')\nprint('Token:', token)\n\n# assuming we ran: harvester recaptcha-v2 -d guerrillamail.com -k 6LcIHdESAAAAALVQtprzwjt2Rq722tkxk-RDQ0aN -p 8888\ntoken = fetch.token('guerrillamail.com', port=8888)\nprint('Token:', token)\n```\n\n#### Any Other Lanuage (via HTTP API)\n\nIf your lanuage of choice isn't Python, then you can grab tokens by making calls to the API endpoints\nthat the harvester's server has avalible.\n\nRoute | Type | Description\n| :--- | :--- | :--- |\n `/\u003cdomain\u003e/token` | String | This is your most useful endpoint. When called it will pop a token from the queue and return it in plain text. If no tokens are available it will return a [418 status code](https://httpstatuses.com/418).\n `/\u003cdomain\u003e/tokens` | List\\[String\\] | This will return a list of all the avalible tokens in the queue. It is recomended that you never use any tokens you see in this list because then `/token` may return an already used token.\n\nWhere `\u003cdomain\u003e` is the domain the harvester was lanuched on. We need this because the harvester supports intercepting multiple domains at a time.\n\n### Programtically\n\nYou can check out [example.py](example.py) to see how to progamatically\nstart the server and access the tokens by integrating the harvester with\nyour existsing (or new) code.\n\nThe main advantage of setting up the harvester programtically is you can\nset multiple interccepter hooks to solve captchas on multiple domains.\n\n## PyArmor/PyInstaller\n\nIf you are using this project with PyArmor and or PyInstaller then fear not, it has\nalready been configured to work seamlessly when packages into an `.exe` file. All you\nhave to do is add the following to your `.spec` file's `Anaysis` call.\n\n```py\nAnaysis(datas=[\n  (\"icon.png\", r\"harvester\\server\"),\n  (\"hcaptcha.html\", r\"harvester\\server\\templates\"),\n  (\"recaptcha-v2.html\", r\"harvester\\server\\templates\"),\n  (\"recaptcha-v3.html\", r\"harvester\\server\\templates\"),\n  (\"domains.html\", r\"harvester\\server\\templates\")\n])\n```\n\n## Credits\n\nInspred by [Cosmo3904/Recaptcha-Harvester-V2](https://github.com/Cosmo3904/Recaptcha-Harvester-V2).\n\nFor help contact @`MacHacker#8396` (Discord)\n\nHas CaptchaHarvester saved you money on your project? Consider buying me a coffee for the countless hours I have\nspent making your job easier?\n\n[![Buy Me A Coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/noahcardoza)\n\nMade with ❤️ by [@NoahCardoza](https://github.com/NoahCardoza)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoahcardoza%2Fcaptchaharvester","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoahcardoza%2Fcaptchaharvester","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoahcardoza%2Fcaptchaharvester/lists"}