Skip to content

How to get raw data for fields and layers in sorted way #656

Answered by Isdriai
Isdriai asked this question in Q&A
Discussion options

You must be logged in to vote

Ok I found .....

Instead

packet.ip.value
or
packet["ip"].value

I do

packet.ip_raw.value
packet["ip_raw"].value

If you also want to have this raw data, be sure you do

pyshark.FileCapture(pcap_file, keep_packets=False, include_raw=True, use_json=True)

You have to include "include_raw=True" and this option works only when "use_json=True"

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Isdriai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant