# -*- coding:utf-8 -*-
# author:f0ngf0ng
import argparse
import ddddocr # 导入 ddddocr
from aiohttp import web
parser = argparse.ArgumentParser()
parser.add_argument("-p", help="http port",default="8888")
args = parser.parse_args()
ocr = ddddocr.DdddOcr()
port = args.p
async def handle_cb(request):
return web.Response(text=ocr.classification(img_base64=await request.text()))
app = web.Application()
app.add_routes([
web.post('/reg', handle_cb),
])
if __name__ == '__main__':
web.run_app(app, port=port)
3、burp导入下载的captcha-killer-modified jar 包
4、找到验证码所在的url,刷新---抓包---并按下图发送到插件
5、切换到插件页面,点击获取,看是否成功获取到验证码
6、填写验证码识别接口,这里有百度的可以用,但是有次数限制,需要修改为自己的token,不推荐,但是如果想使用,只需要在接口的大框框里右键--模板库--百度,点击,就会自动填充百度ocr的模板
此时只需要修改百度的token为自己的即可
7、第7步就是自己本地使用验证码识别项目进行无限制识别,识别成功率85%左右,但是好在没限制,可以无限使用
POST /reg HTTP/1.1
Host: 127.0.0.1:8888
Connection: close
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
Sec-Fetch-Site: none
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Content-Type: application/x-www-form-urlencoded
Content-Length: 55
<@BASE64><@IMG_RAW></@IMG_RAW></@BASE64>
作者:painter 来源:https://www.cnblogs.com/painter-sec/articles/16121913.html