tcpdump 用例
来源:互联网 发布:国家战略知乎 编辑:程序博客网 时间:2024/04/29 08:07
EXAMPLES
To print all packets arriving at or departing from sundown:
tcpdump host sundown
To print traffic between helios and either hot or ace:
tcpdump host helios and \( hot or ace \)
To print all IP packets between ace and any host except helios:
tcpdump ip host ace and not helios
To print all traffic between local hosts and hosts at Berkeley:
tcpdump net ucb-ether
To print all ftp traffic through internet gateway snup: (note that the expression is quoted to prevent the shell from (mis-)interpreting the parentheses):
tcpdump 'gateway snup and (port ftp or ftp-data)'
To print traffic neither sourced from nor destined for local hosts (if you gateway to one other net, this stuff should never make it onto your local net).
tcpdump ip and not net localnet
To print the start and end packets (the SYN and FIN packets) of each TCP conversation that involves a non-local host.
tcpdump 'tcp[tcpflags] & (tcp-syn|tcp-fin) != 0 and not src and dst net localnet'
To print all IPv4 HTTP packets to and from port 80, i.e. print only packets that contain data, not, for example, SYN and FIN packets and ACK-only packets. (IPv6 is left as an exercise for the reader.)
tcpdump 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'
To print IP packets longer than 576 bytes sent through gateway snup:
tcpdump 'gateway snup and ip[2:2] > 576'
To print IP broadcast or multicast packets that were not sent via Ethernet broadcast or multicast:
tcpdump 'ether[0] & 1 = 0 and ip[16] >= 224'
To print all ICMP packets that are not echo requests/replies (i.e., not ping packets):
tcpdump 'icmp[icmptype] != icmp-echo and icmp[icmptype] != icmp-echoreply'
- tcpdump 用例
- tcpdump
- TCPDUMP
- tcpdump
- tcpdump
- tcpdump
- TCPDUMP
- tcpdump
- tcpdump
- tcpdump
- tcpdump
- TCPDump
- Tcpdump
- TCPDUMP
- tcpdump
- tcpdump
- tcpdump
- tcpdump
- UBOOT命令总结
- 当你的小弟说与你有代沟了
- 聊聊淘宝今天的诚信体系纠结
- PHP过滤post,get敏感数据
- ICE Demo
- tcpdump 用例
- 按键软件去抖动设计
- msgsnd()
- 【jBox】 2.3正式版 多功能jQuery对话框插件下载及常见使用问题解答
- Ice安装使用方法----windows
- 一个JSON 实例 jQuery 解析JSON数据
- TestDriven.NET 2.0——单元测试的好助手
- mysql 数据库备份还原
- ubuntu10.10 下手动安装jdk1.6记录