首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > PowerDesigner >

linux tcpdump 捉包

2012-08-08 
linux tcpdump 抓包?1)抓取百度80端口数据包localhost:~ # tcpdump -i eth0 host hostname and src port 8

linux tcpdump 抓包

?


1)抓取百度80端口数据包

localhost:~ # tcpdump -i eth0 host hostname and src port 80
tcpdump: unknown host 'hostname'
localhost:~ # tcpdump -i eth0 host www.baidu.cm? and src port 80
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
^C
0 packets captured
8 packets received by filter
0 packets dropped by kernel

?

2)将抓取的数据包保存到指定的文件中
localhost:~ # tcpdump -l >/mnt/hgfs/tools/baidutcp.txt
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
^C54 packets captured
54 packets received by filter
0 packets dropped by kernel

?

3)查看文件大小
localhost:~ # du -sh /mnt/hgfs/tools/baidutcp.txt
2.5K??? /mnt/hgfs/tools/baidutcp.txt
localhost:~ #

热点排行