我可以将 WireShark(作为命令或 system() 命令)集成到我的 C 程序中,以便嗅探我的 PC 中收到的所有数据包吗?我尝试使用NETCAT。但它不起作用,因为我想要嗅探的数据包是在 UDP 多播地址中发送的:224.1.1.113。
最佳答案
这个工具似乎有你想要的
http://www.netresec.com/?page=RawCap
此外,这里还有对wireshark CLI的引用
https://www.wireshark.org/docs/wsug_html_chunked/ChCustCommandLine.html
它有很多选项可以进行过滤,因此您可以将其设置为您想要的确切数据包类型。您可以调用此命令。
这里是多播过滤器的 wiki 引用
https://en.wikiversity.org/wiki/Wireshark/IPv4_multicast您可以使用。
关于c - 将 WireShark 集成到我的应用程序中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49075958/