Use these scripts to turn tshark JSON file (tshark -r blaah.pcap -T json > packets.json) to packet and flow csv files.
parse_pcap_json.py produces a space-seperated file with one packet per row.
python3 parse_pcap_json.py packets.json > packets.csv
filter_flows.py produces a space-seperated file with one flow per row. It consumes the packet csv file generated by
parse_pcap_json.py. Maximum time length of a flow can be changed in the script and defaults to 60 seconds.
python3 filter_flows.py packets.csv > flows.csv