Skip to content

Instantly share code, notes, and snippets.

@clausd
Created August 17, 2022 07:50
Show Gist options
  • Save clausd/89094ddbef4b00144e5bcc4ff00155cf to your computer and use it in GitHub Desktop.
Save clausd/89094ddbef4b00144e5bcc4ff00155cf to your computer and use it in GitHub Desktop.
HTTP header dumper
sudo stdbuf -oL -eL /usr/bin/tcpdump -i lo -A -s 10240 "tcp port 10000 " | egrep -a --line-buffered ".+(GET |HTTP\/|POST )|^[A-Za-z0-9-]+: " | perl -nle 'BEGIN{$|=1} { s/.*?(GET |HTTP\/[0-9.]* |POST )/\n$1/g; print }'
@clausd
Copy link
Author

clausd commented Aug 17, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment