网络层如何监听?

发布于 2024-10-24 12:17:44 字数 169 浏览 4 评论 0原文

像 AdMuncher 这样的程序似乎会在数据包到达所使用的任何协议之前在网络层拦截数据包。我想做类似的事情,基本上分析每个数据包进入系统并过滤/重写等。我知道我基本上可以编写一个代理(或设置一个代理)来执行类似的操作,但我想拦截它在它到达那个点之前。

不寻找任何特定的语言,但如果可以用 C# 那就太好了。

Programs like AdMuncher seem to intercept packets at the network layer before it ever reaches whatever protocol it is using. I want to do something similar, basically analyze each packet as it comes into the system and filter/rewrite, etc.. I know I can essentially write a proxy (or setup a proxy) to do similar, but I would like to intercept it before it even reaches that point.

Not looking for any specific language, but if it is possible with C# that would be nice.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

零度° 2024-10-31 12:17:44

我假设您将在 Windows 平台上进行构建?如果是这样,您可能需要研究一下 winpcap: http://www.winpcap.org/

Unix/Linux,您需要使用 libpcap: http://www.tcpdump.org/

在这两种方法中,您都需要使用 C/C++ 进行开发,或者使用本机接口从您选择的语言中调用库。

编辑:找到一个您可能想要使用的 WinPcap .NET 包装器:http://pcapdotnet.codeplex。 com/

I assume you'll be building on the Windows platform? If so, you'll probably want to look into winpcap: http://www.winpcap.org/

On Unix/Linux, you'll want to make use of libpcap: http://www.tcpdump.org/

In either of these, you'll need to develop in C/C++ or use a native interface to call the libraries from your language of choice.

EDIT: Found a .NET wrapper for WinPcap that you'll likely want to make use of: http://pcapdotnet.codeplex.com/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文