CaptchaHarvester
Solve captchas yourself without having to pay for services like 2captcha for use in automated projects.
note
At the moment this project can be used for Google's V2 ReCaptchas and hCaptchas.
setup
pip install captcha-harvester
> harvester
This will setup an HTTP server at http://127.0.0.1:5000 by default. This server is also
configured to proxy requests on whichever DOMAIN you pass it.
If you are running MacOS/Windows and have the Brave Browser
or Google Chrome, all you have to do is pass
the -b/--browser flag set to either chrome or brave. This will automatically open
a new instance of Brave/Chrome under a temporary profile with the proxy settings already
configured and loaded at the DOMAIN that was passed to the script. If you want to use
your main profile, you'll need to pass the -r/--restart-browser flag. To reconfigue
the proxy settings the browser will need to be restarted if it is already running.
If you aren't running MacOS/Windows then you'll need to install a proxy extension like Proxy Switcher and Manager that supports PAC Scripts. Use a script like:
function FindProxyForURL(url, host) {
if (host == 'DOMAIN')
return 'PROXY HOST:PORT';
return 'DIRECT';
}
This will make sure that all traffic sent to DOMAIN will be proxied by our server and it
will return one of the template files rather than actually contact the DOMAIN server.
If you would like to come up with an automated solution for your OS, I am open to PR requests.
> harvester -h
usage: harvester [-h] -k SITE_KEY -d DOMAIN [-H HOST] [-p PORT]
[-b {chrome,brave}] [-r]
{recaptcha,hcaptcha}
CaptchaHarvester: Solve captchas yourself without having to pay for services
like 2captcha for use in automated projects.
positional arguments:
{recaptcha,hcaptcha} the type of captcha you are want to solve
optional arguments:
-h, --help show this help message and exit
-k SITE_KEY, --site-key SITE_KEY
the sitekey used by the captcha on page
-d DOMAIN, --domain DOMAIN
the domain for which you want to solve captchas
-H HOST, --host HOST defaults to 127.0.0.1
-p PORT, --port PORT defaults to 5000
-b {chrome,brave}, --browser {chrome,brave}
which browser to open on launch
-r, --restart-browser
if this flag is not passed, a new instance of the
browser willbe opened. this flag is most helpful when
solving Googles ReCaptchasbecause if you restat your
main profile you'll most likely be loggedinto Google
and will be given an easier time on the captchas
For help contact @MacHacker#7322 (Discord)
accessing the tokens
You can either access the tokens from another project/process by useing the
handy fetch.token function I included:
from harvester import fetch
server_address = ('127.0.0.1', 5000)
token = fetch.token(server_address)
print('token:', token)
Or you can check out example.py to see how to progamatically start the server and access the tokens by integrating the harvester with your existsing (or new) code.
credits
Inspred by Cosmo3904/Recaptcha-Harvester-V2.
For help contact @MacHacker#7322 (Discord)
Has CaptchaHarvester saved you money on your project? Consider buying me a coffee!
Metadata
Release files for captcha-harvester 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| captcha-harvester-1.0.2.tar.gz | 8.6 kB | Without provenance | Details for captcha-harvester-1.0.2.tar.gz |
Release files / captcha-harvester-1.0.2.tar.gz
| Download URL | captcha-harvester-1.0.2.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
85dd99d6a7fa82cbb715a5c4ad028ccf905d39068264a7da815a297a3d59f538
|
|
BLAKE2b-256 checksum How to use checksums |
1fcde6d23b0a81073cceb45738e96505b0f1d452f0201d036f3850a64ed6e603
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.0
|
Security for captcha-harvester 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.