Provide api functions for captcha recognition, this repo is created mainly for https://github.com/CharlesPikachu/DecryptLogin
You can star this repository to keep track of the project if it's helpful for you, thank you for your support.
https://hackcaptcha-en.readthedocs.io/zh/latest/
https://hackcaptcha-en.readthedocs.io/en/latest/
Captcha Type | Number of supported algorithms | Number of supported webapis | in Chinese |
---|---|---|---|
Slider | 1 | 0 | 滑块验证码 |
Digital | 0 | 1 | 数字验证码 |
Click | 1 | 0 | 点击验证码 |
run "pip install hackcaptcha"
(1) Offline
Step1: git clone https://github.com/CharlesPikachu/hackcaptcha.git
Step2: cd hackcaptcha -> run "python setup.py install"
(2) Online
run "pip install git+https://github.com/CharlesPikachu/hackcaptcha.git@master"
from hackcaptcha.crackers import AlgorithmsCracker
cracker = AlgorithmsCracker()
# slider captcha
infos_return = cracker.slider(imagepath='CAPTCHA IMAGE PATH', algorithm_type='canny')
# digital captcha
# click captcha
infos_return = cracker.click(imagepath='CAPTCHA IMAGE PATH', algorithm_type='zt12306', text_model_path='text.h5', object_model_path='object.h5')
from hackcaptcha.crackers import WebapisCracker
cracker = WebapisCracker()
# slider captcha
# digital captcha
infos_return = cracker.digital(imagepath='CAPTCHA IMAGE PATH', webapi_type='baidu', app_id='AppID', api_key='API Key', secret_key='Secret Key')
# click captcha
[1]. https://github.com/zhaipro/easy12306