如何解析python库中的数据包?

问题描述:

如何使用 python 从 .pcap 文件或接口解析数据包?

How to you parse a packet from either a .pcap file, or an interface, using python?

我特别在寻找使用文档齐全的库的解决方案.

I'm specifically looking for a solution that uses a well documented library.

尝试 scapy.这是一个非常强大的数据包检查、操作和创建程序.

Try scapy. It is a very powerful program for packet inspection, manipulation and creation.

您可以使用它构建您自己的工具.