Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

设置验证码识别 触发验证码界面后502bad导致无法出来验证码 #52

Open
SRC123123123 opened this issue Apr 10, 2024 · 2 comments

Comments

@SRC123123123
Copy link

SRC123123123 commented Apr 10, 2024

请求 URL:
/api/v1/captcha/img?id=508718283436851723
请求方法:
GET
Status Code:
502 Bad Gateway

photo_2024-04-10_19-44-33

@SRC123123123
Copy link
Author

这是我用的规则

local sh = waf.ipCache
local robotIp = 'rb:' .. waf.ip
local c, f = sh:get(robotIp)

-- 如果是静态页面且没有进行滑动旋转验证码验证则返回
if not (waf.isQueryString or waf.reqContentLength > 0) and f ~= 2 then
return false
end

if not c then
sh:set(robotIp, 1, 60, 1) -- 设置1分钟也就是60秒访问计数时间段
else
if f == 2 then
return waf.checkRobot(waf) -- 启动机器人滑动旋转验证码验证
end
sh:incr(robotIp, 1)
if c + 1 >= 3 then
sh:set(robotIp, c + 1, 1800, 2)
return true, robotIp, true
end
end

return false

@Safe3
Copy link
Owner

Safe3 commented Apr 10, 2024

验证码不能显示,通常是获取客户端ip方式的选项没选对,这个是和客户端ip绑定的,你可以加官方微信群获取帮助

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants