We are trying to figure out how something works on the web (for web scraping/automation) and one of the web pages we are working on issues a popup to do some of the work. One of our most commonly used debug tools is the Chrome network tab in Developer Tools, hit "record" do some work, and then examine what was done and then replicate the work done "offline".
我们正试图弄清楚某些东西在网络上是如何工作的(用于网络抓取/自动化),我们正在处理的一个网页发布弹出窗口来完成一些工作。我们最常用的调试工具之一是开发人员工具中的Chrome网络选项卡,点击“记录”做一些工作,然后检查已完成的工作,然后复制“离线”完成的工作。
However the Developer Tools (in Chrome, Safari and Firefox - all work the same) do not follow requests across a popup, even if you hit "record".
但是,即使您点击“记录”,开发人员工具(在Chrome,Safari和Firefox中 - 都是相同的)也不会在弹出窗口中跟踪请求。
Is there some configuration value I'm missing, or some way to record all network events? We can't use tcpdump/wireshark for this because it's all done over SSL. One option we've considered is a man-in-the-middle https proxy, but I can't find anything pre-written so we'd have to create one ourselves.
是否有一些配置值我缺少,或者某种方式记录所有网络事件?我们不能使用tcpdump / wireshark,因为它都是通过SSL完成的。我们考虑的一个选项是中间人https代理,但我找不到任何预先编写的内容,所以我们必须自己创建一个。
3 个解决方案
#1
3
I don't know of any way to follow the requests across pop-ups, as each window has its own Web Inspector, however you can use Fiddler to inspect HTTPS requests. It will MITM, and subsequently throw a certificate error, which should allow you to inspect all requests in the order that they happened.
我不知道有什么方法可以跨弹出窗口跟踪请求,因为每个窗口都有自己的Web Inspector,但是您可以使用Fiddler来检查HTTPS请求。它将MITM,并随后抛出证书错误,这应该允许您按照它们发生的顺序检查所有请求。
#2
1
You can use Charles Web Debugging Proxy, which is an app that lets you see all the traffic and even replace some responses with your own. Of course that may break HTTPS so you have to accept the certificate errors, but that's usually a minor problem. It works on Win, Mac and even Linux.
您可以使用Charles Web Debugging Proxy,这是一个应用程序,可让您查看所有流量,甚至用您自己的响应替换一些响应。当然,这可能会破坏HTTPS,因此您必须接受证书错误,但这通常是一个小问题。它适用于Win,Mac甚至Linux。
#3
0
The object inspector cannot inspect what isn't in the current page. Therefore, you will need to open the inspector inside the popup url with same parameters in order to see what it does.
对象检查器无法检查当前页面中没有的内容。因此,您需要使用相同的参数在弹出URL内打开检查器,以查看它的作用。
As a tool, you can use a web sniffer to see exactly which url were called during the process.
作为一种工具,您可以使用Web嗅探器查看在此过程中确切调用的URL。
#1
3
I don't know of any way to follow the requests across pop-ups, as each window has its own Web Inspector, however you can use Fiddler to inspect HTTPS requests. It will MITM, and subsequently throw a certificate error, which should allow you to inspect all requests in the order that they happened.
我不知道有什么方法可以跨弹出窗口跟踪请求,因为每个窗口都有自己的Web Inspector,但是您可以使用Fiddler来检查HTTPS请求。它将MITM,并随后抛出证书错误,这应该允许您按照它们发生的顺序检查所有请求。
#2
1
You can use Charles Web Debugging Proxy, which is an app that lets you see all the traffic and even replace some responses with your own. Of course that may break HTTPS so you have to accept the certificate errors, but that's usually a minor problem. It works on Win, Mac and even Linux.
您可以使用Charles Web Debugging Proxy,这是一个应用程序,可让您查看所有流量,甚至用您自己的响应替换一些响应。当然,这可能会破坏HTTPS,因此您必须接受证书错误,但这通常是一个小问题。它适用于Win,Mac甚至Linux。
#3
0
The object inspector cannot inspect what isn't in the current page. Therefore, you will need to open the inspector inside the popup url with same parameters in order to see what it does.
对象检查器无法检查当前页面中没有的内容。因此,您需要使用相同的参数在弹出URL内打开检查器,以查看它的作用。
As a tool, you can use a web sniffer to see exactly which url were called during the process.
作为一种工具,您可以使用Web嗅探器查看在此过程中确切调用的URL。