zoukankan      html  css  js  c++  java
  • tshark (wireshark)笔记

    1. dumpcap -i eth0 -q -n -b duration:120 -b files:5000 -s65535 -f "! ip broadcast and ! ip multicast and ! ether broadcast and ! ether multicast" -w /www/pkg.pcap
      -i eth0 : 抓取网口 eth0 的数据
      -q : 静默方式
      -n : 禁止解析
      -b duration:120 -b files:5000 : 每120s建立一个新文件,最大文件循环数5000个
      -s65535 : 抓取尺寸在65535字节以下的报文。(默认68以下)
      -f "! ip broadcast and ! ip multicast and ! ether broadcast and ! ether multicast" :过滤条件
      -w /www/pkg.pcap : 抓到的包写入的文件

    2. tshark -z ip_hosts,tree -q -r pkg.pcap
      统计这个文件中出现的IP

    3. tshark -z conv,ip -q -r pkg.pcap
      统计这个文件中出现的IP以及这个IP的流量

    4. tshark -z io,stat,2,"ip.addr==192.168.1.101" -t ad -q -r pkg.pcap
      统计这个文件中IP192.168.1.101每隔2s的流量

    5. tshark -z conv,tcp -q -r pkg.pcap
      tshark -r pkg.pcap -T fields -e ip.src -e ip.dst -e tcp.srcport -e tcp.dstport
      统计文件中出现的4元组

    6. tshark -r pkg.pcap -T fields -e eth.src -e eth.dst
      tshark -z conv,eth -q -r pkg.pcap
      统计每个抓到的包里面出现的MAC,这个文件必须是针对某一个网卡(eth0, eth1),而不能是any

    7. mergecap -w pkg.pcap pkg_00001* pkg_00002*
      把所有相符的包文件都合并为一个pkg.pcap文件

  • 相关阅读:
    Linux下C语言的调试--转
    linux下c的网络编程---转载
    redis学习资料
    Keepalived配置与使用--转载
    Redis configuration
    keepalived程序包
    Keepalived 使用指南
    myeclipse解决JSP文件script调整背景颜色
    java 面试题汇总(未完成)
    c++ primer plus(文章6版本)中国版 编程练习答案第八章
  • 原文地址:https://www.cnblogs.com/fengbohello/p/4665153.html
Copyright © 2011-2022 走看看