Linux 如何在特定端口上打印传入的http请求

Linux 如何在特定端口上打印传入的http请求,linux,http,ubuntu,tcpdump,Linux,Http,Ubuntu,Tcpdump,我的Linux服务器上有一个发送HTTP请求的设备。我想查看从该设备到特定端口上的Linux HTTP服务器的所有传入请求的格式。我已经使用Tcpdump尝试过了,但是它似乎不是人类可读的,这很难理解这个设备发送什么类型的HTTP请求。在ubuntu服务器上是否有任何命令/工具可用于跟踪此类信息?我使用tcpdump捕获数据,并在笔记本上检查数据: sudo tcpdump -ni any port 80 -vv -s0 -w http.pcap 一些信息: -n: don't convert

我的Linux服务器上有一个发送HTTP请求的设备。我想查看从该设备到特定端口上的Linux HTTP服务器的所有传入请求的格式。我已经使用Tcpdump尝试过了,但是它似乎不是人类可读的,这很难理解这个设备发送什么类型的HTTP请求。在ubuntu服务器上是否有任何命令/工具可用于跟踪此类信息?

我使用tcpdump捕获数据,并在笔记本上检查数据:

sudo tcpdump -ni any port 80 -vv -s0 -w http.pcap
一些信息:

-n: don't convert hosts, ports to names
-i any: capture on all interfaces
-vv: verbose output to see packet count
-s0: capture whole packet
-w http.pcap: write to file
收集足够的数据后,只需按Ctrl+C,然后使用wireshark打开文件

虽然您可以使用
tcpdump
单独获取一些信息

-A     Print each packet (minus its link level header) in ASCII.  Handy for capturing web pages

这只会让您走到目前为止。

我使用tcpdump捕获数据,并在笔记本上检查数据:

sudo tcpdump -ni any port 80 -vv -s0 -w http.pcap
一些信息:

-n: don't convert hosts, ports to names
-i any: capture on all interfaces
-vv: verbose output to see packet count
-s0: capture whole packet
-w http.pcap: write to file
收集足够的数据后,只需按Ctrl+C,然后使用wireshark打开文件

虽然您可以使用
tcpdump
单独获取一些信息

-A     Print each packet (minus its link level header) in ASCII.  Handy for capturing web pages

这只会让你走到这一步。

我投票将这个问题作为离题题关闭,因为它将在StackOverflow上关闭,但在上可能是ontopic。我投票将这个问题作为离题关闭,因为它将在StackOverflow上关闭,但在上可能是ontopic。