QuestionQ9

Packet Analysis with Python

The variable traffic holds a Scapy packet list. A programmer executes the following command:

p1 = traffic[1]

Which option describes the contents of p1 with respect to the traffic packet list?

  • A All Ethernet layer frames
  • B The contents of the second packet
  • C TCP streams with a session ID of 1
  • D The data stored from the first byte onward
Explanation

A Scapy PacketList holds packets and supports sequence-style indexing. Because indexing is zero-based, index 1 returns the second packet in the list.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!