csvexport-to-csvpcapfile-conversion

Convert PCAP to CSV


I have 82 .pcap files and I need to convert all of them into .csv format. Is there any way that I can convert all of the files together?

The way I could find was using WireShark but using that I’ll need to convert each file one by one which is an extremely tedious task.


Solution

  • Use tcpdump to read the pcap files and output the data in TSV

    tcpdump -qns 0 -r inputFILE.pcap | awk -f pcapToTSV.awk > outputFILE.tsv

    Convert TSV to CSV using csvformat

    csvformat -t outputFILE.tsv > outputFILE.csv