1.下载安装插件
https://github.com/f0ng/captcha-killer-modified
2.启动本地验证码识别服ddddocr
codereg.py
# -*- coding:utf-8 -*-
# author:f0ngf0ng
import argparse
import ddddocr # 导入 ddddocr
from aiohttp import web
import base64
parser = argparse.ArgumentParser()
parser.add_argument("-p", help="http port",default=8888)
args = parser.parse_args()
ocr = ddddocr.DdddOcr()
port = args.p
auth_base64 = "f0ngauth" # 可自定义auth认证
async def handle_cb(request):
if request.headers.get('Authorization') != 'Basic ' + auth_base64: # 可自定义auth认证,不需要注释就好
return web.Response(text='Forbidden', status='403')
print(await request.text())
img_base64 = await request.text()
img_bytes = base64.b64decode(img_base64)
# return web.Response(text=ocr.classification(img_bytes)[0:4]) 验证码取前四位
# return web.Response(text=ocr.classification(img_bytes)[0:4].replace("0","o")) 验证码取前四位、验证码中的0替换为o
return web.Response(text=ocr.classification(img_bytes)[0:4])
app = web.Application()
app.add_routes([
web.post('/reg', handle_cb),
])
if __name__ == '__main__':
web.run_app(app, port=port)
在codereg.py的目录下cmd,打开终端
python codereg.py
如果出现上面的情况,说明没有安装ddddocr模块,按此命令安装
pip install ddddocr aiohttp -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
出现这个界面说明成功了
3.抓验证码的包,发送到插件
这里可以随便找个需要验证登入的网站试试,我用的是本地的。
http://127.0.0.1/yanzheng/yanzhengma.php → Extensions ...
1.首先在Extensions的模块添加第一步下载安装的插件
2.添加成功会出现新的模块captcha-killer-modified
3.抓包想要验证登陆的网站,然后按右键把请求发送到Extensions→captcha-killer-modified 0.16→captcha-killer→Send tasaptcha panel
打开captcha-killer-modified模块,然后点击“获取”
4.配置识别服务模板
【注意中间有空行】
POST /reg HTTP/1.1
Host: 127.0.0.1:8888
Authorization:Basic f0ngauth
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:97.0) Gecko/20100101 Firefox/97.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Accept-Encoding: gzip, deflate
Connection: keep-alive
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
Content-Length: 8332
<@BASE64><@IMG_RAW></@IMG_RAW></@BASE64>
并把接口URL设置为
http://127.0.0.1:8888
5.抓登录的包,payload选插件,单线程
1.添加要暴破的值
2.第一个值要暴破的设置,并添加字典。bp专业版有提供一些字典
3.第二个值要暴破的设置
4. 设置单线程攻击
5.开始攻击
6.我遇到的情况
1.如果出现中文乱码,设置一下字体
2.如果没有暴破,可以重启一下bp或codereg.py服务
3.终端输入python codereg.py出现了下面的情况
如果出现上面的情况,说明没有安装ddddocr模块,按此命令安装
pip install ddddocr aiohttp -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com