Skip to content

Instantly share code, notes, and snippets.

View travishegner's full-sized avatar

Travis Hegner travishegner

View GitHub Profile
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