美文网首页
tcpdump命令

tcpdump命令

作者: ld9183 | 来源:发表于2019-01-18 11:31 被阅读0次

1. tcpdump用途

抓包

2. tcpdump用法

tcpdump [option] expression

3. option

-n: 进制反向解析,禁用将Ip地址转化为主机名字
大大缩短命令执行时间

-i: tcpdump抓取的网络接口,如果不指定,tcpdump查找系统接口列表,监听数字最小的接口, 不包含loopback
一般指定any, 可以监听所有的接口

-nn: Don’t convert protocol and port numbers etc. to names either

-s: Snarf snaplen bytes of data from each packet rather than the default of 65535 bytes
抓取整个包的 snaplen 字节的数据,而不是默认的65535字节
如果设置为0,则表面采用默认的65535字节

-Z: Drops privileges (if root) and changes user ID to user and the group ID to the primary group of user
更改用户id和groupid

-G If specified, rotates the dump file specified with the -w option every rotate_seconds seconds. Save files will have the name specified by -w which should include a time format as defined by strftime(3). If no time format is specified, each new file will overwrite the previous.
如果指定的话, 每rotate_seconds秒切换一下dump file

-w Write the raw packets to file rather than parsing and printing them out.
把raw packet写到文件中,而不是解析打印出来到标准输出

3. expression

  • dst host [parm]
  • src host [parm]
  • host [parm]
  • src port [parm]
  • dst port [parm]
  • port [parm]
  • [proto]
    tcp, dup, icmp

4. example

tcpdump -i any -nn port 41001 and host 10.13.32.244 and tcp
tcpdump -iany -nn -Z root -G 10 -w ./%Y_%m_%d-%H_%M_%S.cap tcp and port 41001

相关文章

  • tcpdump命令详解

    linux命令之tcpdump 1、tcpdump命令简介 tcpdump命令是基于unix系统的命令行的数据报嗅...

  • tcpdump 正则过滤

    tcpdump采用命令行方式,它的命令格式为: tcpdump [ -adeflnNOpqStvx ] [ -c ...

  • 测试物语:tcpdump

    HOW TO USE tcpdump采用命令行方式,它的命令格式为:tcpdump [ -adeflnNOpqSt...

  • tcpdump的基本命令和使用

    tcpdump的基本命令和使用 介绍   tcpdump是linux下的抓包命令, 可以指定网卡/port/hos...

  • 使用tcpdump查看HTTP请求响应

    tcpdump安装 在Ubuntu/Debian系统上,执行如下命令安装tcpdump工具: 在CentOS系统上...

  • tcpdump抓包命令

    tcpdump抓包命令 tcpdump是一个用于截取网络分组,并输出分组内容的工具。tcpdump凭借强大的功能和...

  • linux 高级网络命令

    1、tcpdump命令 tcpdump命令是一款sniffer工具,它可以打印所有经过网络接口的数据包的头信息,也...

  • tcpdump命令

    监视指定网络接口的数据包 tcpdump -i eth0 如果不制定网卡,默认监听第一个网络接口 监视指定主机的数...

  • tcpdump命令

    1. tcpdump用途 抓包 2. tcpdump用法 tcpdump [option] expression...

  • tcpdump 抓包

    1:抓包命令 tcpdump-i网卡port端口-wabcd.pcap-v tcpdump-i网卡...

网友评论

      本文标题:tcpdump命令

      本文链接:https://www.haomeiwen.com/subject/sfvgdqtx.html