What a Great Day

September 11, 2006

[Off topic, yet cool] ICFES

Filed under: Uncategorized — f3lheadhunter @ 12:20 pm

Disclaimer: If you don’t know what VIM, WGET, or an URL is, get away from here (to google, of course, and then come back)

so I run into this page:

which contains a small amount of links, with ICFES tests (kinda like SAT), and I hit the midle mouse button, just to find out they use “javascript” ARGH!, I think to myself.
but then, looking a litle closer, I find this:


this “rec”directory, arouses my curiosity, so i open it


there must be 4000 documents or so!
I have to download this stuff RIGHT AWAY!
so I proceed to o the following.

1. view source
2. use a VIM regulare expression to find all the links


and I pass those to a new buffer, (using a VIM macro) q … and then @
however, pressing @@ 4000 times is kinda lame so i just use
(normal mode)

which works wonders.

now I have a new buffer with something like this:


3. to get just the URLS, I use a regular expression, like this one:


however, all these addresses are in a form:

but I will need the full url, so I must append the server name:


now I have something like


BUT I need this to be commands I can run, to download the pages, so I’ll just use wget (look it up)

%s/.*/wget &/

and now I have a 4000 lines file downloading progranm, like:


I know I could have just downloaded HTTrack, or something ilke that, BUT I just couldn’t resist using VIM.

There are easier ways.

all of this could have been avoided, by the sysadmins, If they just had put a “dont show dir contents server directive” on this folder, or an even easier blank index.html file, but they were far too lazy to do that.


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: