Created
June 15, 2019 15:08
-
-
Save non7top/a9f06c2f71aa99ee03d60387c190573d to your computer and use it in GitHub Desktop.
dump_http_headers
This file contains 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
# https://serverfault.com/a/633452 | |
stdbuf -oL -eL /usr/sbin/tcpdump -A -s 10240 -i lo "tcp port 82 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)" | 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