1

I am processing a huge pcap file by Scapy, but it's slow.

When I am planning refactoring it by Pyshark, I found that there is an function named 'pyshark.FileCapture()' which offers a option: only_summaries.

That's what I want. So, is there any option or method in Scapy too?

edcSam
  • 97
  • 1
  • 13

1 Answers1

0

No, it does't have. I got this answer on github by gpotter2 who one of the person in charge of scapy.

See https://github.com/secdev/scapy/issues/1509

If you want to perform the better, you can use with

PcapReader(filename) as reader:
    for pkt in reader:
        [... actions on  the pkt ...] You can store specific informations on the packet that you want, or directly perform actions

on the packet. But scapy does not have a only_summaries by itself: scapy would have to dissect the packet anyways, before returning only some few informations

Community
  • 1
  • 1
edcSam
  • 97
  • 1
  • 13