Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 pyshark 获取原始层?例如,如果一个数据包有一个 DNS 层,我想获取 DNS 层中所有字段的内容。 在此处输入图像描述
如果有人感兴趣,我已经找到了解决方案:)
cap = pyshark.FileCapture(cap_path, include_raw=True, use_json=True) packet = cap[0] packet_data = packet[packet.highest_layer].value