这是我得到的输出:
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
我就是这样提供auth参数的:
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参数,因此登录失败。你能提供一个
现在的
如何将基于脚本的身份验证的登录参数传递给Zap API的示例?
非常感谢