Wireshark 本地主机流量捕获 [英] Wireshark localhost traffic capture
问题描述
我用 C 语言编写了一个简单的服务器应用程序,它在本地主机上运行.如何使用 Wireshark 捕获本地主机流量?
I wrote a simple server app in C which runs on localhost. How to capture localhost traffic using Wireshark?
推荐答案
如果您使用的是 Windows 这是不可能的 - 请阅读以下内容.您可以改用机器的本地地址,然后您就可以捕获内容.请参阅CaptureSetup/Loopback.
If you're using Windows it's not possible - read below. You can use the local address of your machine instead and then you'll be able to capture stuff. See CaptureSetup/Loopback.
总结:您可以在Linux 上的环回接口,在包括 Mac OS X 在内的各种 BSD,以及在 Digital/Tru64 UNIX 上,你可能能够在 Irix 和 AIX 上做到这一点,但是你绝对不能这样做Solaris、HP-UX....
Summary: you can capture on the loopback interface on Linux, on various BSDs including Mac OS X, and on Digital/Tru64 UNIX, and you might be able to do it on Irix and AIX, but you definitely cannot do so on Solaris, HP-UX....
尽管该页面提到仅使用 Wireshark 在 Windows 上是不可能的,但您实际上可以使用 中提到的解决方法记录它不同的答案.
Although the page mentions that this is not possible on Windows using Wireshark alone, you can actually record it using a workaround as mentioned in a different answer.
大约 3 年后,这个答案不再完全正确.链接页面包含在环回接口上捕获的说明.
Some 3 years later, this answer is no longer completely correct. The linked page contains instructions for capturing on the loopback interface.
这篇关于Wireshark 本地主机流量捕获的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!