如何在不使用 PCap 的情况下嗅探 .NET 中的本地传出网络流量?

发布于 2024-09-04 00:15:15 字数 116 浏览 1 评论 0原文

我想以某种方式连接到本地系统的网络堆栈来捕获传出的网络数据包,而不使用 Winpcap。不幸的是,它时不时会使我的系统崩溃。

有没有办法从用 .NET 语言编写的用户空间进程“嗅探”本地系统的传出流量?

I'd like to somehow hook into the local system's network stack to capture outgoing network packets without using Winpcap. Unfortunately it tends to crash my system every now and then.

Is there a way to "sniff" outgoing traffic of the local system from a user space process written in a .NET language?

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

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

发布评论

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

评论(2

听闻余生 2024-09-11 00:15:16

我使用 NIRSOFT 的 smsniff。您需要成为计算机的管理员才能嗅探任何流量。

http://www.nirsoft.net/utils/smsniff.html

我从来没有见过 .net 用于嗅探流量。但也许 Microsoft 的 NetMon 有一个可以从 .Net 调用的 COM 接口,

但一如既往,您需要成为管理员才能嗅探流量,因为需要将 NIC 置于混杂模式。

I use smsniff from NIRSOFT. You need to be admin on the machine to sniff any traffic.

http://www.nirsoft.net/utils/smsniff.html

I have never seen .net used to sniff traffic. But maybe NetMon from Microsoft has a COM interface you call from .Net

But as always you need to be admin to sniff traffic, since it is needed to put the NIC in promiscuous mode.

A君 2024-09-11 00:15:15

你想要的是 网络监视器 API。更多此处此处

What you want is the Network Monitor API. More here and here.

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