
Security News
New CNA Scorecard Tool Ranks CVE Data Quality Across the Ecosystem
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Captcha Solution package is a simple interface to multiple captcha solving services.
The simplest case is to solve captcha image stored into file.
Pass the file handler to the solve
method. The solution will
be stored into "solution" key of returned result. In "raw" key
there is a full original response that captcha service returned.
from captcha_solution import CaptchaSolver
solver = CaptchaSolver('anticaptcha', api_key='YOUR-API-KEY')
with open('captcha.png', 'rb') as inp:
res = solver.solve(inp)
print(res['solution'])
If you want to solve non-image type of captcha (text captcha, recaptcha, etc) you have to
use same solve
method but you need to pass the dict of parameters. Each captcha service has its own
request data schema so you need to consult with documentation to figure out format of request
Documentation is https://2captcha.com/2captcha-api?form=3019071#solving_recaptchav2_new
Required POST parameters are: key, method, googlekey, pageurl. You do not have to pass key (api key), it is already done by solver. The code would be like:
res = solver.solve({
"method": "userrecaptcha",
"googlekey": "VALUE-OF-SITE-KEY",
"pageurl": "URL-OF-PAGE-WHERE-RECAPTCHA-IS-DISPLAYED"
})
print('Solution: %s' % res['solution'])
print('Raw Response: %s' % res['raw'])
Documentation is https://anticaptcha.atlassian.net/wiki/spaces/API/pages/5079084/Captcha+Task+Types We need to use NoCaptchaTaskProxyless type of task. This task objects has required keys: type, websiteURL, websiteKey Code will looks like:
res = solver.solve({
"task": {
"type": "NoCaptchaTaskProxyless",
"websiteKEY": "VALUE-OF-SITE-KEY",
"websiteURL": "URL-OF-PAGE-WHERE-RECAPTCHA-IS-DISPLAYED",
}
})
print('Solution: %s' % res['solution']['gRecaptchaResponse'])
print('Raw Response: %s' % res['raw'])
2captcha.com (aka rucaptcha.com)
2captcha
and rucaptcha
anticaptcha
FAQs
Universal interface to captcha solving services
We found that captcha-solution demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.