【问题标题】:tshark: apply filter then output a fixed number of packetstshark:应用过滤器然后输出固定数量的数据包
【发布时间】:2015-03-02 19:23:15
【问题描述】:

我想使用一个 tshark 命令:打开一个捕获文件,对其内容应用过滤器,然后输出固定数量的结果数据包。目前,我想出了

tshark -r <infile> -Y <display filter> -w <outfile> -c <number of packets>

问题是-c <number of packets> 在应用显示过滤器之前工作,即它将<display filter> 应用于原始捕获文件的第一个<number of packets>,这不是我想要的。如何反转订单?到目前为止,我一直在阅读手册页,但没有运气。

【问题讨论】:

    标签: command-line packet-capture tshark


    【解决方案1】:

    TShark:
    tshark -r server_01.pcapng -l -Y dns > tshark -c 100 -w server_01_dns100.pcapng

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-27
      • 1970-01-01
      • 2018-04-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多