Skip to content

Instantly share code, notes, and snippets.

@barryirwin
Last active November 4, 2018 17:02
Show Gist options
  • Save barryirwin/3736d580a27b1ba1786c49d130ba755c to your computer and use it in GitHub Desktop.
Save barryirwin/3736d580a27b1ba1786c49d130ba755c to your computer and use it in GitHub Desktop.
Pcap to csv ish thing
tcpdump -nqttttr pcapfile | \
sed -e 's/IP/./g' -e 's/>/./g' -e 's/://g' | \
awk -F. '{print $1" "$3"."$4"."$5"."$6" "$7" "$8"."$9"."$10" "$12}' |\
awk '{print $1","$3","$4","$5","$6}'
Example output
#day,
2018-11-01,138.255.1.254,34462,165.213.254,88
....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment