Created
August 21, 2017 12:42
-
-
Save lrivallain/0d9ca010a8d0e8911ef13470c7634a3e to your computer and use it in GitHub Desktop.
Sniff HTTP(s) hosts on a gateway
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
| #/bin/bash | |
| # | |
| # Use this script to sniff the HOST requested by a single IP for HTTP(s) requests | |
| # | |
| # Usage : ./sniff.sh XX.XX.XX.XX | |
| # | |
| tcpdump -Alfq -s 1024 " | |
| (tcp dst port 443 or tcp dst port 80 or tcp dst port 8080) | |
| and ip[2:2] > 40 | |
| and src host $1 | |
| and tcp[tcpflags] & tcp-push != 0" \ | |
| | grep -i " > \|get\|host" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment