温馨提示×

CentOS Sniffer如何导出抓包数据

小樊
53
2025-09-07 22:17:38
栏目: 智能运维

在CentOS系统中,可使用tcpdump或Wireshark导出抓包数据,具体如下:

  • 使用tcpdump导出:先安装tcpdump,命令为sudo yum install tcpdump。然后指定网络接口捕获数据并导出到文件,如sudo tcpdump -i eth0 -w output.pcap,其中eth0为网络接口名,output.pcap为保存抓包数据的文件名。按Ctrl+C可停止捕获。
  • 使用Wireshark导出:安装Wireshark,命令是sudo yum install wireshark。通过tshark -i eth0 -w capture.pcap命令捕获数据并保存到capture.pcap文件。按Ctrl+C停止捕获。

0