Dump a web page

curl -s http://google.com | hexdump -C|less
Useful to browse dangerous web sites.
Sample Output
00000000  3c 48 54 4d 4c 3e 3c 48  45 41 44 3e 3c 6d 65 74  |<HTML><HEAD><met|
00000010  61 20 68 74 74 70 2d 65  71 75 69 76 3d 22 63 6f  |a http-equiv="co|
00000020  6e 74 65 6e 74 2d 74 79  70 65 22 20 63 6f 6e 74  |ntent-type" cont|
00000030  65 6e 74 3d 22 74 65 78  74 2f 68 74 6d 6c 3b 63  |ent="text/html;c|
00000040  68 61 72 73 65 74 3d 75  74 66 2d 38 22 3e 0a 3c  |harset=utf-8">.<|
00000050  54 49 54 4c 45 3e 33 30  31 20 4d 6f 76 65 64 3c  |TITLE>301 Moved<|
00000060  2f 54 49 54 4c 45 3e 3c  2f 48 45 41 44 3e 3c 42  |/TITLE></HEAD><B|
00000070  4f 44 59 3e 0a 3c 48 31  3e 33 30 31 20 4d 6f 76  |ODY>.<H1>301 Mov|
00000080  65 64 3c 2f 48 31 3e 0a  54 68 65 20 64 6f 63 75  |ed</H1>.The docu|
00000090  6d 65 6e 74 20 68 61 73  20 6d 6f 76 65 64 0a 3c  |ment has moved.<|
000000a0  41 20 48 52 45 46 3d 22  68 74 74 70 3a 2f 2f 77  |A HREF="http://w|
000000b0  77 77 2e 67 6f 6f 67 6c  65 2e 63 6f 6d 2f 22 3e  |ww.google.com/">|
000000c0  68 65 72 65 3c 2f 41 3e  2e 0d 0a 3c 2f 42 4f 44  |here</A>...</BOD|
000000d0  59 3e 3c 2f 48 54 4d 4c  3e 0d 0a                 |Y></HTML>..|

3
By: chilicuil
2010-02-02 18:54:49

These Might Interest You

  • Docker's local man pages are (often) half of what you have online, so I wanted that as local man. Install lynx and run my oneliner, then use as follows: dockpage Adjust lynx's page width at will Show Sample Output


    0
    dockpage() { lynx -width=180 --dump https://docs.docker.com/v1.11/engine/reference/commandline/$1/ | sed -n '/^Usage/,/On this page/{/On this page/b;p}'; }
    nnsense · 2017-09-18 23:53:34 2
  • This microscript looks up a man page for each word possible, and if the correct page is not found, uses w3m and Google's "I'm feeling lucky" to output a first possible result. This script was made as a result of an idea on a popular Linux forum, where users often send other people to RTFM by saying something like "man backup" or "man ubuntu one". To make this script replace the usual man command, save it as ".man.sh" in your home folder and add the following string to the end of your .bashrc file: alias man='~/.man.sh' Show Sample Output


    9
    /usr/bin/man $* || w3m -dump http://google.com/search?q="$*"\&btnI | less
    d1337r · 2010-10-05 13:51:39 0

  • -1
    mail -s scream-dump user@example.com < /tmp/scream-dump
    imsaar · 2009-12-01 21:04:22 0
  • The example will create a directory called " Caveats: @imports of css files will not be converted.


    8
    wget -p --convert-links http://www.foo.com
    damniel · 2009-02-13 19:02:08 0

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: