0

How can I get the raw layer using pyshark? For example if a packet has a DNS layer, I would like to get the content of all the feilds in the DNS layer. enter image description here

Jonathan
  • 1
  • 2

1 Answers1

0

I have found the solution if someone is interested :)

cap = pyshark.FileCapture(cap_path, include_raw=True, use_json=True)
packet = cap[0]
packet_data  = packet[packet.highest_layer].value
Jonathan
  • 1
  • 2