Created
August 17, 2022 07:50
-
-
Save clausd/89094ddbef4b00144e5bcc4ff00155cf to your computer and use it in GitHub Desktop.
HTTP header dumper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From https://serverfault.com/questions/504431/human-readable-format-for-http-headers-with-tcpdump
A lifesaver for debugging e.g. proxy setups...