``` yum install wireshark -y yum install tcpdump -y ``` 要使用Wireshark的命令行工具`tshark`来捕获出口HTTP流量,您可以使用以下过滤器: 复制代码sudo tshark -i eth0 -Y 'http.request.method == "GET" and ip.dst == <destination_ip>' 请将 `` 替换为您所需的目标IP地址。该命令将从接口`eth0`开始捕获所有发送到指定目标IP地址的HTTP GET请求,并将它们打印到控制台中。 如果您想要将捕获的数据包写入文件以供稍后分析,您可以使用以下命令: 复制代码sudo tshark -i eth0 -Y 'http.request.method == "GET" and ip.dst == <destination_ip>' -w http_capture.pcap 该命令将从接口`eth0`开始捕获所有发送到指定目标IP地址的HTTP GET请求,并将它们写入名为`http_capture.pcap`的文件中。 请注意,在上述命令中,您需要将 `` 替换为您所需的目标IP地址,同时需要使用sudo权限运行该命令。 Loading... ``` yum install wireshark -y yum install tcpdump -y ``` 要使用Wireshark的命令行工具`tshark`来捕获出口HTTP流量,您可以使用以下过滤器: <pre class="code-block-wrapper"><div class="code-block-header"><span class="code-block-header__lang"></span><span class="code-block-header__copy">复制代码</span></div><code class="hljs code-block-body ">sudo tshark -i eth0 -Y 'http.request.method == "GET" and ip.dst == <destination_ip>' </code></pre> 请将 `<destination_ip>` 替换为您所需的目标IP地址。该命令将从接口`eth0`开始捕获所有发送到指定目标IP地址的HTTP GET请求,并将它们打印到控制台中。 如果您想要将捕获的数据包写入文件以供稍后分析,您可以使用以下命令: <pre class="code-block-wrapper"><div class="code-block-header"><span class="code-block-header__lang"></span><span class="code-block-header__copy">复制代码</span></div><code class="hljs code-block-body ">sudo tshark -i eth0 -Y 'http.request.method == "GET" and ip.dst == <destination_ip>' -w http_capture.pcap </code></pre> 该命令将从接口`eth0`开始捕获所有发送到指定目标IP地址的HTTP GET请求,并将它们写入名为`http_capture.pcap`的文件中。 请注意,在上述命令中,您需要将 `<destination_ip>` 替换为您所需的目标IP地址,同时需要使用sudo权限运行该命令。 Last modification:June 24, 2023 © Allow specification reprint Like 如果觉得我的文章对你有用,请随意赞赏