Skip to content

Instantly share code, notes, and snippets.

@kramse
Created July 23, 2014 19:36
Show Gist options
  • Save kramse/cd5217b4ed5a1e0fed47 to your computer and use it in GitHub Desktop.
Save kramse/cd5217b4ed5a1e0fed47 to your computer and use it in GitHub Desktop.
This is intended for https://code.google.com/p/logstalgia/
sudo tcpdump -q -i en1 -nn -tttt | grep IP | sed -E 's/\.[0-9][0-9][0-9][0-9][0-9][0-9] / /g' | tr '-' '/' | tr -d ',' | sed 's/\./ /4' | sed 's/\./ /7' | sed 's/: / /g'| awk -v date="$(date +"%d/%m/%Y")" '{ print $4 " \- \- \[" date "\:" $2 " \+0200] \"GET \/" $7 "\/" $9 "\/" $8 "\/ HTTP/1.1\" 200 " $10 " - -" }' | logstalgia -f --disable-glow -
Was hacked together because we thought logstalgia was cool, but wanted to show TCP packets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment