tcpdump
tcpdump host 192.168.1.100 截获主机192.168.1.100收到和发送的全部数据包
tcpdump host hello and \(hot or ace\) 截获主机hello与后台或ace之间的数据包
tcpdump host ace and not hello 截获ace与其他主机(不包括hello主机)之间的数据包
tcpdump -i eth0 src host hello 截获主机hello 发送的全部数据包
tcpdump -i eth0 dst host hello 截获全部送到主机hello 全部数据包
tcpdump tcp port 23 host 192.168.1.100 截获主机23号端口接受和发送的数据包
使用tcpdump抓取HTTP包
tcpdump -XvvennSs 0 -i eth0 tcp[20:2]=0x4745 or tcp[20:2]=0x48540x4745 为"GET"前两个字母"GE",0x4854 为"HTTP"前两个字母"HT"。
本博客内容均来自网络,如有雷同,是我抄袭!