【问题标题】:How to configure the output of Tshark/Wireshark .psml file如何配置 Tshark/Wireshark .psml 文件的输出
【发布时间】:2016-01-06 15:24:24
【问题描述】:

我正在用 Python 创建一个简单的数据包分析器,用于分析 Tshark .xml 输出文件。

Tshark(命令行等效于 Wireshark)有一个功能,允许将所有数据包输出到 .psml 文件(数据包摘要标记语言)。在 Wireshark 中,我可以通过在 GUI 中添加/删除选项卡来配置导出的 .psml 文件的内容。但是,我无法通过在 Tshark 中使用命令行来执行此操作。

Wireshark 的示例输出:

<?xml version="1.0"?>
<psml version="0" creator="wireshark/2.0.0">
<structure>
<section>No.</section>
<section>Time</section>
<section>Source</section>
<section>Destination</section>
<section>Protocol</section>
<section>Length</section>
<section>Info</section>
<section>dBm</section>
</structure>

<packet>
<section>1</section>
<section>0.000000</section>
<section>xx:xx:xx:xx:xx:xx</section>
<section>Broadcast</section>
<section>802.11</section>
<section>223</section>
<section>Beacon frame, SN=1524, FN=0, Flags=........C, BI=100, SSID=xxx</section>
<section>4294967260 dBm</section>
</packet>

在 Tshark 中,我得到的输出没有 dBm (IEEE 802.11 RSSI) 部分。如何配置 Tshark 在.psml 文件中获取这些数据?

【问题讨论】:

    标签: xml wifi wireshark tshark network-analysis


    【解决方案1】:

    PSML 显示将显示在 Wireshark 的摘要窗格中的列或没有 -V 的 TShark 的输出,因此您需要请求 RSSI 列。

    大概“添加/删除标签”是指“添加/删除列”。

    尝试使用命令行选项运行 TShark

    -o gui.column.format:'"No.", "%m", "Time", "%t", "Source", "%s", "Destination", "%d", "Protocol", "%p", "Length", "%L", "Info", "%i", "dBm", "%e"'
    

    指定显示哪些列 - 或放入 PSML 输出。

    (不幸的是,Wireshark 2.x 中存在一个错误,其中 dBm 值以 PSML 形式写入,就好像它是无符号,因此,例如,-33 dBm 显示为 4294967263。我'已经检查了一个修复,所以它应该在 Wireshark 2.0.2 出来时修复。Wireshark 1.x 没有这个错误。)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-03-25
      • 1970-01-01
      • 2018-01-10
      • 2014-03-08
      • 2015-02-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多