要从指定网卡中捕获数据包,运行:
tcpdump -i eth0
使用 -w 选项将所有捕获的包写入文件:
tcpdump -i eth1 -w packets_file
使用下面命令从之前创建的 tcpdump 文件中读取内容:
tcpdump -r packets_file
要获取整个网络的数据包,在终端执行下面命令:
tcpdump net 192.168.1.0/24
tcpdump -i eth0
tcpdump -i eth1 -w packets_file
tcpdump -r packets_file
tcpdump net 192.168.1.0/24
本文标题:tcpdump 常用例子
本文链接:https://www.haomeiwen.com/subject/rbvkactx.html
网友评论