验证码识别
验证码的用途和分类
验证码的作用
验证身份:代表是你在做的
使用手机号/邮箱登录
敏感操作二次验证:异地登录,修改密码,注销等
验证行为:
机器批量操作:投票,抢购,注册,发帖,爬虫等
计算机图灵测试CAPTHA(Completely Automated Public Turing test to Computers and Humans Apart)区分 是人还是机器的行为
验证码的分类
静态验证码:
图片验证码:
问答式验证码:
行为间验证码:
点击:
拖动:
间接式验证码:短信,邮箱,电话
无感验证码:只有异常的时候才会有弹窗
验证码的开发实现
验证码自动识别
用代码识别图片内容:OCR(Optical Character Recognition)光学字符识别
组件:https://github.com/jaidedai/easyocr
直接使用pip install easyocr就可以安装
import easyocr reader = easyocr.Reader(['ch_sim','en']) result = reader.readtext('http://127.0.0.1/yanzheng/yanzhengma.php') print(result)
远程OCR识别服务(打码平台)
百度OCR
baidu.py
pip install baidu_aip -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
其他打码平台:
http://www.ttshitu.com/
验证码
http://www.chaojiying.com/