捕获HTTP请求
问题描述:
有没有办法来监控和使用C#捕获从一台机器所有传出的HTTP请求?
Is there a way to monitor and capture all outgoing HTTP requests from a machine using C#?
我需要一个独立于浏览器的方式记录访问的网址。
I need a browser independent way of logging visited URLs.
答
您可能希望使用现有的网络接口捕捉像PCAP或WinPcap的图书馆这样做。
自己重写所有必需的东西将是相当昂贵的时间。
You may want to use existing network interfaces capturing libraries like pcap or winpcap to do so. Rewriting all the necessary stuff by yourself would be quite time expensive.
链接到的 PCAP
链接 WinPcap的
编辑:刚才看见有人还写了C#绑定WinPcap的: SharpPcap
Edit : Just saw someone also wrote the C# bindings to winpcap : SharpPcap