Chinaunix首页 | 论坛 | 博客
  • 博客访问: 101015435
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: LINUX

2008-03-21 21:53:06

来源:赛迪网    作者:korn

大家可能都已经对著名的抓包工具Ethereal比较熟悉了,这里再介绍一种基于命令行的抓包工具tcpdump。

举例:抓本机1813端口上的数据,并将抓包结果保存在test.cap文件中

tcpdump -X -s 0 -w test.cap port 1813
-X Print each packet (minus its link level header) in hex and ASCII.
-s snaplen Setting snaplen to 0 means use the required length to catch whole packets.
-w file Write the raw packets to file rather than parsing and printing them out.

然后在本地可以用Ethereal图形化界面查看所抓到包的详细信息。这在通过远程登录在服务器上工作的情况下特别有用,因为终端模式无法用图形化工具抓包。

阅读(198) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~