首页 > 解决方案 > 从 pcap 文件中提取 UDP 数据流

问题描述

如何使用 tshark 将 pcap 文件中捕获的所有数据包的 udp 数据流(ascii 格式)转换为文本文件。我试过这个

tshark -V -r /tmp/file_src.pcap > file_dst.txt

但我怎样才能只得到 udp 数据流?

谢谢

标签: pythonudpwiresharktshark

解决方案


您可以使用 tshark 的 -Y 标志来指定过滤器

tshark -V -r /tmp/file_src.pcap -Y udp > file_dst.txt

推荐阅读