Wednesday, October 28, 2009

[BLUG] hiding an .html link as an .mp3

So I was googling around looking for some music from old PC games I used to play and found the music from Monkey Island 2 here:

(i would NOT view this site w/out some sort of adblock installed, it is seriously annoying)


My first thought was to open up a terminal and grab them with wget like so:

wget -r -np -A.mp3 url

But it seems that although the links are listed as .mp3, they are in fact links to new pages.  For example:


is actually a new page which then has a link to the actual mp3: 


Which is a legit file this time.  I hate these kinds of sleazy sites and usually avoid them but I'm curious as to how this is actually working.  Looking through the html for the site, it looks like your standard link.  So when I tell wget to recursively scan for .mp3s it thinks it finds a match and downloads the "mp3"  (I also tried the Firefox plugin dowmthemall but it has the same effect) Does anybody have any idea how this sort of thing works?  

Ben

(as a side note, it's nice when I run into these types of sites when I'm booted into Ubuntu.  They may be annoying but I'm not worried about getting all sorts of nasty malware)

No comments: