Skip to content

Instantly share code, notes, and snippets.

@barryirwin
Created November 4, 2018 16:10
Show Gist options
  • Save barryirwin/65e5d040477801c8d537cce9d2c05cd7 to your computer and use it in GitHub Desktop.
Save barryirwin/65e5d040477801c8d537cce9d2c05cd7 to your computer and use it in GitHub Desktop.
count of packets by day
#!/bin/sh
# (c) Barry Irwin <bvi@moria.org>
# November 2018
# takes in a tcpdump input as below. prints out a count of traffic by day.
# format expected tcpdump needs -tttt
# 2018-09-28 20:28:47.016856 IP A.B.C.D.SPORT > A.B.C.D.dport : Flags [S], seq 1995830557, win 14600, length 0
cat - | awk '{print $1}' | sort | uniq -c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment