我一直在使用Zest登录脚本运行Zap认证扫描,但是在我更新Zap映像之后,auth已经崩溃了--这似乎是由于API的改变。
这是我得到的输出:
5309955 [ZAP-ProxyThread-3963] INFO org.parosproxy.paros.control.Control - New session file created
zap | 5313051 [ZAP-ProxyThread-3971] INFO org.zaproxy.zap.authentication.ScriptBasedAuthenticationMethodType - Loaded script for API:login.zst
zap | 5313633 [ZAP-ProxyThread-3975] WARN org.zaproxy.zap.extension.api.API - Bad request to API endpoint [/JSON/users/action/setAuthenticationCredentials/] from [10.254.0.6]:
zap | Missing Parameter (missing_parameter) : Username我就是这样提供参数的:
authmethod_params = ('scriptName=' + auth_script_name + '&'
'Submission Form URL={0}/{1}&'
'Username field=username&'
'Password field=password&'
'Target URL=http://www.example.com/login')
# setup authentication
auth = zap.authentication
auth.set_authentication_method(
contextid=context_id,
authmethodname=auth_method_name,
authmethodconfigparams=authmethod_params)由于某些原因,API不识别username参数,随后登录失败。您能否提供一个当前的示例,说明如何将基于脚本的auth登录参数传递给Zap?
非常感谢
发布于 2019-01-31 21:05:39
找到原因: auth破坏了一个新用户,因为我没有在请求中更新基64编码的凭据。
https://stackoverflow.com/questions/54466260
复制相似问题