I have been searching for libraries that can transform PCAP files to CSV format while keeping all the details defined in the pcap file, without explicitly defining which features/fields that i want to include in CSV format.
I have tested tools such as Wireshark, tshark, and tcpdump, but I think for all of them that I have to manually specify the list of features/columns that to be included in my data. Is there a way that I can transform pcap file to csv file and keep all pcap details by default without having to manually listing all the features to include in csv?
Edit to add Code Example:
$ tshark -r traffic.pcap > traffic.csv
$ tshark -r traffic.pcap -T fields -e ip.src -E separator=, \
-E occurrence=f > traffic.csv
In any case, the traffic.csv contains only general information (e.g., No., Time, Source, Destination, Length, Protocol, Info) of the traces without any packet detail. Is there a way I can also have the the details of each packet in the csv file?
Any kind insight is greatly appreciated.
tshark -T json
can be used to get ALL the data. If you're not happy with just using-e ip.src
, why not include more fields to save with additional-e <field>
? – Ross Jacobs