Show live HTTP requests being made on OS X

sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E "Host\: .*|GET \/.*"
Replace "en1" with your network interface (on OS X, usually en0, en1, eth0, etc..)
Sample Output
GET /services/rest/news/new/?stamp=1238809183049 HTTP/1.1
Host: www.qbn.com
GET / HTTP/1.1
Host: news.bbc.co.uk
GET /services/rest/news/new/?stamp=1238809185049 HTTP/1.1
Host: www.qbn.com

-2
By: peterc
2009-04-04 01:41:48

These Might Interest You

  • World Cup Live Score of the ongoing match. Alternative to have the live score with the match statistics: watch -n10 --no-title "w3m http://www.livescore.com/ |awk '/live [0-9H]+[^ ]/,/red cards/'" Show Sample Output


    1
    watch -n10 --no-title "w3m http://www.livescore.com/ |egrep 'live [0-9H]+[^ ]'"
    boustrophedon757 · 2014-06-12 21:44:26 0
  • trace http requests on the specified interface. uses the amazing tshark tool (http://www.wireshark.org/docs/man-pages/tshark.html) Show Sample Output


    0
    tshark -i en1 -z proto,colinfo,http.request.uri,http.request.uri -R http.request.uri
    lele · 2011-04-05 14:18:35 0

  • 7
    rtmpdump -v -r rtmp://livestfslivefs.fplive.net/livestfslive-live/ -y "aljazeera_en_veryhigh" -a "aljazeeraflashlive-live" -o -| mplayer -
    ricardoarguello · 2011-03-29 19:33:39 4
  • On the another machine write this command. pv -r /dev/zero | nc 192.168.1.1 7777 It will show live throughput between two machine.The destination machine ip is at our example 192.168.1.1 You must multiply by 8 for the network calculation. You must install pv and netcat commands for this commands usage. kerim@bayner.com http://www.bayner.com/ Show Sample Output


    1
    nc -l -p 7777 > /dev/null
    kerim · 2011-01-24 00:06:45 2

What Others Think

yes its work nice. Thanks!
megerdin · 480 weeks and 4 days ago
http://gist.github.com/90077 might be worth a look too. It'll print out the URLs in a more complete fashion (only works with HTTP and only tested on OS X).
peterc · 480 weeks and 4 days ago
And of course there's urlsnarf from the dsniff collection.
udim · 478 weeks and 4 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: