用 tshark 分析数据包
从命令行读取 pcap 并打印数据包摘要或字段值。
运行 tshark -r capture.pcap,解码并列出抓包文件中的数据包。
01命令
命令
$ tshark -r capture.pcap02作用说明
tshark 在无图形界面下使用 Wireshark 的解析器,可用 -Y 过滤、-T fields -e 选择字段、-z 输出统计,便于脚本化和在服务器上通过 SSH 使用。
03风险
!注意: 实时抓包需要提权;抓包常含敏感载荷,请谨慎存储和分享。
04撤销
✓无需撤销——该命令不会改变持久状态。
05来源
- Debian package: tshark依据: Debian packages tshark, the command-line version of Wireshark, which dissects capture files.
- Wireshark / tshark依据: Debian packages tshark, the command-line version of Wireshark, which dissects capture files.
最后验证: 2026-09-22 · 分类: 网络