【发布时间】:2018-09-14 12:55:09
【问题描述】:
我想将 Burp 配置为我的 java 代码的代理,以查看请求和响应。 Burp 作为 Web 浏览器之间的代理可以正常工作,但不适用于 java 应用程序。
我在我的代码中添加了这样的行:
WebClient client = new WebClient();
System.setProperty("https.proxyHost", "127.0.0.1");
System.setProperty("https.proxyPort", "8081");
client.getOptions().setCssEnabled(false);
client.getOptions().setJavaScriptEnabled(false);
client.getCookieManager().setCookiesEnabled(true);
URL url = new URL("https://www.google.com");
WebRequest request = new WebRequest(url, HttpMethod.GET);
Page page = client.getPage(request);
并配置 Burp 监听 8081 端口。
我还需要做什么吗?
【问题讨论】:
-
能否请您发布一个 Java 代码 sn-p 显示您想在应用程序中执行的操作。
-
感谢您的回复。我已经编辑了我的帖子。在 Burp 我还设置 -> 代理 -> 选项 -> 添加 -> 绑定到端口 8081