--- title: Downloading online songs date: "2008-09-17T12:00:00Z" categories: - coding wp_id: 30 description: I show how to download 'non-downloadable' songs by extracting URLs from SMIL files and spoofing the RealPlayer User Agent. I used Fiddler to reverse-engineer these sites and built a Java applet to automate the process. keywords: [fiddler, user agent switcher, smil, realmedia, reverse engineering, musicindiaonline, security by obscurity] --- You know those songs on [Raaga](http://www.raaga.com/), [MusicIndiaOnline](http://www.musicindiaonline.com/), etc? The ones you can listen to but can't download? Well, you can download them. It's **always** been possible to download these files. After all, that's how you get to listen to them in the first place. What stopped you is [security by obscurity](http://www.google.com/search?q=security+by+obscurity). You didn't know the location where the song was stored, but if you did, you could download them. So how do you figure out the URL to download the file from? Let's take a look at [MusicIndiaOnline](http://www.musicindiaonline.com/) first. When you click on a song, it pops up in a new window. You can't figure out the address of that window because the address bar is hidden, but you can get it by hovering over the link before clicking, or by right-clicking and copying the link location. It's always something like this: It always has the same structure: **http://www.musicindiaonline.com/p/x/****something****/.** Let's call that the **something** the song's key. Now, what this page does is play a .SMIL file. An SMIL file is a text file that has a list of songs to play. This file is always stored at (Notice that the key remains the same.) If you type this into your browser, you'll get a text file that you can open in Notepad. You'll find that it has a bunch of lines, two of which are interesting. There's one that reads: The content="..." part gives you the first part of the song's address. Then there's a line that reads: