diff options
Diffstat (limited to '')
-rwxr-xr-x | src/scripts/pcap_log-converter.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/scripts/pcap_log-converter.sh b/src/scripts/pcap_log-converter.sh new file mode 100755 index 0000000..80148e9 --- /dev/null +++ b/src/scripts/pcap_log-converter.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# Check that tshark is installed and return a nice message. +if ! command -v tshark > /dev/null; then + echo "pcap support requires 'tshark' v3+ to be installed" > /dev/stderr + exit 1 +fi + +# We want tshark output to come in UTC +export TZ=UTC + +# Use tshark to convert the pcap file into a JSON-lines log file +exec tshark -T ek -P -V -t ad -r $2 |