如何在owasp zap中同时执行两个站点

how to execute two sites at a same time in owasp zap

我正在尝试在 owasp zap 中执行 ajax 蜘蛛攻击。我在firefox中设置了一个代理服务器来记录。但是我有两个站点,一个是普通页面,另一个是 API 请求。现在,当我在正常页面执行 ajax spider 时,只显示主页但不执行登录操作,因为它记录在站点 2 中。我如何整合两个站点同时工作? 请指导我如何做到这一点!

还在 ZAP 用户组上提问(并回答):https://groups.google.com/d/msg/zaproxy-users/jo9_tyy7XLM/180INyTTAQAJ

In this case you need to AJAX Spider a Context with the authentication configured (i.e. include in context "localhost:3000" and authenticate against "localhost:4000"). [1] Having the "login URL" in another server is not a problem.

[1] https://github.com/zaproxy/zap-core-help/wiki/HelpStartConceptsAuthentication

我遇到了同样的问题,我在用户群里问过ZAP的问题。 当一个应用程序有两个站点时,您需要将默认上下文配置为第一个站点,即在您的情况下 localhost:3000,然后使用第二个站点,即身份验证部分中的 localhost:4000在默认上下文中找到并执行测试。 希望这对您有所帮助!