Wireshark本地主机流量捕获 [英] Wireshark localhost traffic capture
问题描述
我用C语言编写了一个简单的服务器应用程序,该应用程序在localhost上运行.如何使用Wireshark捕获本地主机流量?
I wrote a simple server app in C which runs on localhost. How to capture localhost traffic using Wireshark?
推荐答案
如果您使用Windows,则不可能-请阅读以下内容.您可以改为使用计算机的本地地址,然后就可以捕获东西.参见 CaptureSetup/环回 .
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上的回送接口 各种BSD,包括Mac OS X,以及 在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屋!