有没有办法在.NET编程听HTTP流量?没有办法、流量、NET、HTTP

2023-09-02 02:05:17 作者:月亮不见了.

我使用的浏览器自动化测试的网站,但我需要验证从浏览器(例如,图像,外部脚本,XmlHtt prequest对象)的HTTP请求。有没有一种方法以编程实例化一个代理服务器或数据包嗅探器的浏览器来使用,以看看它的发送?

I'm using browser automation for testing web sites but I need to verify HTTP requests from the browser (i.e., images, external scripts, XmlHttpRequest objects). Is there a way to programmatically instantiate a proxy or packet sniffer for the browser to use in order to see what its sending?

我已经使用招看流量,但我想要的东西,是UI少,我可以在持续构建集成使用。

I'm already using Fiddler to watch the traffic but I want something that's UI-less that I can use in continuous build integration.

我可以很容易地从WinPcap的获得HTTP特定的信息?

Can I easily get the HTTP-specific information from WinpCap?

推荐答案

尝试 WinPcap的。它的驱动器/库组合,其可用于监测的数据包。根据您正在尝试做的(手表交通瓦特/ OA UI)是什么,这可能是比写自己代理一个简单的解决方案。

Try winpcap . It's a driver/library combination which can be used to monitor packets. Based on what you are trying to do (watch traffic w/o a UI), this is probably a simpler solution than writing your own proxy.

 
精彩推荐
图片推荐