Python使用scapy库读取wireshark抓包文件然后写入新文件无法显示

问题描述 投票:0回答:1

使用Python中的scapy库读取Wireshark捕获的文件,然后重写为新的pacp文件。再次用Wireshark打开后,有些字段无法显示。

这是用Python编写的代码

from scapy.all import *

PKT_List = []
pkts = rdpcap("E:\test.pcap")
for pkt in pkts:
    PKT_List.append(pkt)

wrpcap("E:\output.pcap", pkts)

下面第一张图是原始数据包,第二张图是经过python处理后用Wireshark打开的数据包。

enter image description here

enter image description here

python wireshark scapy
1个回答
0
投票

有人知道如何解决这个问题吗?我很着急

© www.soinside.com 2019 - 2024. All rights reserved.