在PCAP文件中重新组装片段
我们有很大的(100个MIB-3 GIB)PCAP文件,这些文件具有巨大的UDP数据报,这些数据报很大,我们需要在Python中处理它们,最好是逐个数据,by-datagram,而无需首先阅读所有内容,因为潜在的大小,文件。我正在寻找能够读取和重新组装IP数据包的软件包。我已经查看了pypcapfile
,dpkt
和scapy
。其中,AFAICT仅scapy
重新组装片段,但它需要首先将文件完全读取到内存中,无论如何GPLV2许可证在我们的组织中是无法容忍的。是否有其他其他 PCAP阅读和处理软件包可以解码并进行片段重新组装,最好是by-datagram?
另外 - 这不是一个Python问题 - 是否有OTS命令行工具可以将数据包从一个PCAP重新组装到另一个PCAP?我尝试了tshark
-r
,-w
和-y ip.flags.mf == 0
或-r ip.flags.mf == 0
,到目前为止没有骰子。
We have largish (100 MiB-3 GiB) PCAP files that have huge UDP datagrams that are heavily fragmented, and we need to process them in Python, preferably datagram-by-datagram without reading everything into memory first, due to the potential size of the files. I'm looking for a package that is capable of reading and reassembling IP packets. I've looked at pypcapfile
, dpkt
, and scapy
. Of these, AFAICT only scapy
reassembles fragments, but it requires reading the file entirely into memory first, and anyway the GPLv2 license is intolerable in our organization. Are there any other PCAP reading and processing packages out there that will decode and do fragment reassembly, preferably datagram-by-datagram?
Alternatively -- this is not a python question -- is there an OTS command-line tool that will reassemble packets from one PCAP to another? I tried tshark
with -r
, -w
, and -Y ip.flags.mf==0
or -R ip.flags.mf==0
and so far no dice.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
关于最后一部分,这可能是解决方案:
Regarding the last part, this may be the solution: