Skip to content

Instantly share code, notes, and snippets.

@galfert
Forked from peterc/httpdump
Created April 4, 2009 10:29

Revisions

  1. peterc revised this gist Apr 4, 2009. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion httpdump
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@
    # 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:
    # 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 \/.*""

  2. peterc created this gist Apr 4, 2009.
    9 changes: 9 additions & 0 deletions httpdump
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    # 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:
    # (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.