Skip to content

Instantly share code, notes, and snippets.

@tclh123
Forked from thomd/httpdump
Last active August 29, 2015 14:07
Show Gist options
  • Save tclh123/831da2ce8eea02c32ec6 to your computer and use it in GitHub Desktop.
Save tclh123/831da2ce8eea02c32ec6 to your computer and use it in GitHub Desktop.
# Monitor HTTP requests being made from your machine with a one-liner..
# Replace "en1" below with your network interface's name (usually en0 or en1)
sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E "Host\: .*|GET \/.*"
# OR.. to be able to use as "httpdump" from anywhere, drop this into ~/.bash_profile:
# (again replace "en1" with correct network interface name)
alias httpdump='sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E "Host\: .*|GET \/.*"'
# All the above tested only on OS X.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment