8-31 890 views
监听网卡 eth0
tcpdump -i eth0
指定端口
tcpdump -i eth0 -nn 'port 8888'
输出到文件,这个文件可以用wiresharp分析
tcpdump -i eth0 -nn 'port 8888' -d p.pacp
监听指定的主机
192.168.1.231这台主机接收到的包和发送的包都会被抓取。
$ tcpdump -i eth0 -nn 'host 192.168.1.231'
只有192.168.1.231这台主机发送的包才会被抓取。
$ tcpdump -i eth0 -nn 'src host 192.168.1.231'
这样只有192.168.1.231这台主机接收到的包才会被抓取。
$ tcpdump -i eth0 -nn 'dst host 192.168.1.231'