Adds capability to store `pkt_list` for each session packet
This PR adds a capability to store pkt_list for each session packet which controlled via the store parameter to sniff(). When Scapy is run in session mode it parses the provided pcap/packetlist into "session" packets which have len=None. This PR allows for the storage of the original packets that make up the "session" packets in an attached PacketList as a class variable pkt_list. It is something I have found useful when parsing TCP/HTTP flows.
It was done fairly quickly so happy to be advised on how best to update/modify for better compliance. e.g. I wasn't sure if one should add a field to the Packet type for this or somewhere else?
Could you explain what's the use case for this, and add a test that uses it? I also don't see how some parts work.
Codecov Report
Merging #3058 (a8cc88b) into master (2da3800) will not change coverage. The diff coverage is
n/a.
@@ Coverage Diff @@
## master #3058 +/- ##
=======================================
Coverage 52.38% 52.38%
=======================================
Files 9 9
Lines 1365 1365
=======================================
Hits 715 715
Misses 650 650
I've updated the code to be PEP8 compliant. The self.store is just using the existing store variable/property to activate the pkt_list functionality. As I mentioned I can document this feature if the implementation is agreeable - if not maybe you could suggest a better place/way to store the packet list.
Sessions have been changed a lot so this PR is obsolete. Closing.