Skip to content

Instantly share code, notes, and snippets.

@strlcp
Created December 8, 2013 16:59
Show Gist options
  • Select an option

  • Save strlcp/7860235 to your computer and use it in GitHub Desktop.

Select an option

Save strlcp/7860235 to your computer and use it in GitHub Desktop.
get the time between tcp packets, sync packets are ignored.
#!/bin/sh
OBSERVED="gist.github.com"
tcpdump -tt -i wlan0 host $OBSERVED | awk '{ if (! match ($7, "S]")) { if (($1 - timeNow) >= 1) { print strftime("%a %b %e %H:%M:%S %Z %Y", $1), " --- ",($1 -timeNow) ; } }; timeNow=$1; }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment