免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1377 | 回复: 0
打印 上一主题 下一主题

tcpdump抓包 wireshark(ethereal)分析 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-12-23 13:09 |只看该作者 |倒序浏览
tcpdump 的抓包保存到文件的命令参数是-w xxx.cap
抓eth1的包
tcpdump -i eth1 -w /tmp/xxx.cap
抓 192.168.1.123的包
tcpdump -i eth1 host 192.168.1.123 -w /tmp/xxx.cap
抓192.168.1.123的80端口的包
tcpdump -i eth1 host 192.168.1.123 and port 80 -w /tmp/xxx.cap
抓192.168.1.123的icmp的包
tcpdump -i eth1 host 192.168.1.123 and icmp -w /tmp/xxx.cap
抓192.168.1.123的80端口和110和25以外的其他端口的包
tcpdump -i eth1 host 192.168.1.123 and ! port 80 and ! port 25 and ! port 110 -w /tmp/xxx.cap
抓vlan 1的包
tcpdump -i eth1 port 80 and vlan 1 -w /tmp/xxx.cap
抓pppoe的密码
tcpdump -i eth1 pppoes -w /tmp/xxx.cap
以100m大小分割保存文件, 超过100m另开一个文件 -C 100m
抓10000个包后退出 -c 10000
后台抓包, 控制台退出也不会影响:
nohup tcpdump -i eth1 port 110 -w /tmp/xxx.cap &
抓下来的文件可以直接用ethereal 或者wireshark打开。 wireshark就是新版的ethereal,程序换名了,哈哈。


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/12592/showart_448564.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP