Esnips Trick Explained
The Esnips Link Generator Is Here
Yesterday I read a post in esnips forum claiming that IndianRaga has used his ideas to create his esnips link generator and has not given him credits.
So before anyone else hops in and claims that I have used his ideas to create the link generator, I will explain why and how did I create my link generator.
One of my friend Saurabh from esnips who read my previous post about esnips download trick told me that the old tricks are not working anymore. So I fired firefox navigated to esnips tried the previous nsdoc trick, it didn’t work.
I then looked into the source and found script reference to the javascript file that contained methods to create the MP3 Widget (Link : http://res1.esnips.com/3rd/media/music12.js)
It contains definition for two type of mp3 widget
1. Flash Widget – function makeWMPlayer(songURL, autoPlay)
2. WMP Widget – function makeFlashMP3Player(songURL, autoPlay)
songURL is the nsdoc url /nsdoc/576a33f6-af0d-40e3-b673-edda3098661b
I think when the file that you are accesing is a mp3 file and the browser has flash player installed it creates the Flash Widget and for other type of media file it creates WMP Widget sometimes QuickTime Widget.
[code=js]function makeFlashMP3Player(songURL, autoPlay){
var objectHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width=328 height=94 id="MP3Player">';
objectHTML += '<param name="movie" value="/escentral/images/widgets/flash/viewer_esnips_player.swf"/>'
objectHTML += '<param name="salign" value="lt" />';
objectHTML += '<param name="quality" value="high" />';
objectHTML += '<param name="scale" value="noscale" />';
objectHTML += '<param name="FlashVars" value="theFile=' + songURL + '&autoPlay=yes&thePlayerURL=/escentral/images/widgets/flash/int_mp3WidgetPlayer.swf&theTheme=blue"/>';
objectHTML += '<embed src="/escentral/images/widgets/flash/viewer_esnips_player.swf"';
objectHTML += ' quality="high" scale="noscale" width=328 height=94 name="MP3Player" salign="LT" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" FlashVars="theFile=' + songURL + '&autoPlay=yes&thePlayerURL=/escentral/images/widgets/flash/int_mp3WidgetPlayer.swf&theTheme=blue"/>';
objectHTML += '</object>';
document.write(objectHTML);
}[/code]
This line is important
[code=js]objectHTML += '<param name="FlashVars" value="theFile=' + songURL + '&autoPlay=yes&thePlayerURL=/escentral/images/widgets/flash/int_mp3WidgetPlayer.swf&theTheme=blue"/>';[/code]
Any variable that you send in FlashVars will be available to the actionscript.Important information to note from this code were
theFile = the baseURL+nsdoc+songid
the theme = blue
these informations are sent to the esnips adserver servlet.
Then I decompiled the Flash Player Widget.
I was searching for the code that generates the URL .. the download URL had two dynamic part and rest were always same .. the baseURL i.e. h**p://w*w.esnips.c*m/nsdoc/ and ts_id ns_flash/file1.mp3 there was a random number betweek ts_id/ and ns_flash. What was that??
while reading the code I found this code
[code=js]var id = randRange(1, 1000000);
_global.uiListener = "ui_listener_" + id + "_" + swfName;
_global.playerListener = "player_listener_" + id + "_" + swfName;[/code]
The length of the random number and the length of the random number randRange function would generate were different. So this function was not generating the random number. I guess this id is used to act as an instance name for the player/user.
Then I saw this code
[code=js]if (_level0.theFile != null)
{
servletURL = extractBaseURL(_level0.theFile) + "/adserver";
} // end if
var adsLoader = new AdsLoader("esnips_player-" + _level0.theTheme, servletURL);
adsLoader.load();[/code]
If _level0.theFile!=null remember the javascript was passing a FlashVar while creating the widget that contained this variable? theFile contains the baseURL with nsdoc and songid.
The if condition checks if theFile variable has been set then set the servletURL which is h**p://w*w.esnips.c*m/adserver
Then the widget name (esnips_player-themecolor) and the servletURL is passed to the AdsLoader class
[code=js]class AdsLoader extends XmlLoader
{
var xml, adList, servletURL, getElementByName;
function AdsLoader(widgetName, servletURL)
{
super();
trace (servletURL + "....");
xml = new XML();
adList = new Array();
xml.ignoreWhite = true;
this.servletURL = servletURL + "/?widget=" + widgetName + "&ts=" + new Date().getTime();
} // End of the function
function load()
{
var _loc2 = new LoadVars();
_loc2.sendAndLoad(servletURL, xml, "POST");
} // End of the function
function populateAdList()
{
var _loc6 = this.getElementByName(xml, "ads");
var _loc4 = _loc6.childNodes;
for (var _loc5 in _loc4)
{
var _loc3 = _loc4[_loc5];
var _loc2 = new Object();
_loc2.url = _loc3.attributes.url;
_loc2.text = _loc3.attributes.text;
adList[_loc5] = _loc2;
} // end of for...in
} // End of the function
} // End of Class[/code]
The constructor of the AdsLoader class creates rest of the URL. Let me explain the important lines
super(); // Executes the constructor of the base class XmlLoader
Actually esnips keeps list of the songs in XML
Then rest of the url is created
[code=js]this.servletURL = servletURL + "/?widget=" + widgetName + "&ts=" + new Date().getTime();[/code]
now value of servletURL becomes h**p://w*w.esnips.c*m/adserver/?widget=esnips_player-blue&ts=1207300103780 (1207300103780 will varry)
new Date().getTime(); // this gives you current time in milliseconds
So now it was clear that the random number was time in milliseconds
So I started creating my link generator. I could have created a HTML+Javascript link generator, but since I was already inside Flash I thought of creating the link generator in flash (Everyone now a days has flash player installed in his browser)
I simply dropped few textboxes and button onto the stage, used RegEx to extract the songID and then on button click generated the final URL depending upon the choice whether it was a mp3 file or any other kind of file.
First I gave a lanch browser button on clicking the button it would launch a new browser and navigate to the final URL. But when there is a referer to the final URL it doesn’t work. It gets redirected to the original page. So I created a copy to clipboard button so that the user can copy and paste the url in his browser.
PS: Please excuse my typo’s
[ad#after-post-text-ad]


[...] Read Why & How I created this Link Generator // [...]
Esnips Link Generator - How To Download Songs From Esnips | Zuhaib
4 Apr 08 at 5:00 am
The program could not be installed for lack of Security signatures. May be these are my security settings but I need this program . Please reply with suggestions for me to istall this link creater.
[ Reply ]
PS
10 Apr 08 at 1:38 am
What are u installing?? you only need flash player installed on your system thats it .. and its normally installed in your browser ..
or download the esnips.exe
The link generator is here
[ Reply ]
Zuhaib
10 Apr 08 at 3:36 am
I tried to download a file. Got a Download link,
Download link goes same esnips page and no download.
Please help me
[ Reply ]
Aamir
29 Apr 08 at 9:49 am
I dont think so .. it works for me and for others they dont face any issues .. try downloading the file again .. see that you copy the correct esnips url .. and then after generating click on the download button .. if popup gets blocked then allow popup and then try again .. It will work
[ Reply ]
Zuhaib
29 Apr 08 at 10:18 am
Nope. It doesn’t work for me. Maybe they fixed it?
[ Reply ]
Threesword
29 Apr 08 at 1:29 pm
It works .. I have fixed the generator .. check it out
[ Reply ]
Zuhaib
30 Apr 08 at 4:55 am
Yep! It works now! Thanks Zhuhaib for bringing music back! ^_^
[ Reply ]
Threesword
1 May 08 at 4:55 pm
Hats off zuhaib,
Great work,
WoRking………….
Your observation is very good, one question puzzles me you said that the number is time in millisecods, how you got the idea of exact time in miliseconds which esnips Use.??
[ Reply ]
Johny
5 May 08 at 1:14 am
esnips just uses a valid time in milliseconds ..
I knew any number will do the trick because.. unlike cooltoad for example esnips allows public access to its files .. doesn’t matters if you are not logged it .. so actually the file gets downloaded to your temporary internet files every time you play something .. but you dont have any easy option to save it; because you dont have a direct link to download the file .. and the player widget knows the direct link .. but it uses it to play the file not to download it .. so now that you have the direct link and the default behavior of the browser is to download any media file unless you have any media plugin installed in your browser like quicktime which will rather play the song instead of downloading.
PS : I edited your comment .. my name is Zuhaib not Zubair
[ Reply ]
Zuhaib
5 May 08 at 4:36 am
the bandwidth notice comes again. Not able to download this link from esnip.
[ Reply ]
milind
5 May 08 at 4:55 am
the file that you are trying to download has been downloaded many times and has exceeded the bandwidth alloted to him .. so try downloading the file later some day
[ Reply ]
Zuhaib
5 May 08 at 6:42 am
Hey Boss…great job with the widget. I dont know flash programming (and never thought of the idea to decompile the widget), but I was trying using the link of the files which are allowed to be downloaded, but that only worked with the files with the permission. So great job…keep it up.
[ Reply ]
Himanshu
5 May 08 at 1:09 pm
Great job! I came to know about your link generator through IndianRaga, who is on Multiply.
I am really thankful to you! I have downloaded many files from there using your downloader.
[ Reply ]
vkhawani
24 May 08 at 10:49 am
Great.
[ Reply ]
Vinoth
23 Jun 08 at 1:41 am
excellent work of esnips downloader
It really works. thanks for that
[ Reply ]
Raghav
23 Jul 08 at 12:48 pm
Dood ! Excellent….
Which decompiler did u use ?
I tried sothink.. but could not get the code that you have shown…
I progressed till the decompile level.. but could not get any code.. It was all like byte codes.. no normal action script was visible there !
[ Reply ]
Quakeboy
30 Jul 08 at 7:43 am
@Quakeboy
I used Softthink SWF Decompiler ..
[ Reply ]
Zuhaib
31 Jul 08 at 4:59 am
Fantastic job!Hats off 2 u…
[ Reply ]
Rhea
17 Aug 08 at 1:45 pm
Thanks Zuhaib, Have been unsuccessfully trying to get some particular tracks thru ‘nsdoc’ for some time. Your link generator worked like pure magic. Thanks once again, Hats Off to you buddy.
[ Reply ]
Indrajit
18 Aug 08 at 4:28 am
Oh my god!
You are my new god!
I’ve been dying to download trance music from Zakuro111 that I bumped into in youtube some months ago (yeah months and still leeching). I searched high and low and tested a few audio recorders and found out the recording process will always degrade the song regardless of the software… =( I usually have to settle with my results even after playing with quality editor, despite being an amateur with no knowledge of editing sounds. I was only midway into my leeching and my usual scanning through comments (Zak fear copyrights, despite the many comments that display author and name of song that she tries to hide) an enlighten commenter wrote “try googling Zakuro111 for the anime pics” (she slaps on nice pics with nice trance songs to go with it) and following on that advice I stumbled upon ESNIPS… I was totally in W T F !?!?!? mode. It never dawned upon me she’d been snatching music from another site to compile her list of best trance songs of various Dj’s from different countries … and apparently the anime pics too. Further pondering and searches, in how to leech music from forum, egged me into searching on how to leech off of esnips. Through trial and error I finally bumped into this glories, awe inspiring, god-like program called… “ESNIPS.EXE”(according from what my download says…)
HORRAY!
From what will take me months (often too busy) to finish, will now only take me a few days.
I know this may sound like a cliché with an empty ring to it, but THANK YOU! For this wonderful program.
[ Reply ]
lazyman
6 Oct 08 at 10:03 pm
here’s a list for those that are wondering what sort of “best” trance music that had me digging my way to finding esnips and Zuhaib’s program:
http://www.youtube.com/profile_videos?user=Zakuro111
[ Reply ]
lazyman
6 Oct 08 at 10:11 pm
by the way think you can make the same program for youtube?
[ Reply ]
lazyman
6 Oct 08 at 10:46 pm
@lazyman
thank you for such a wonderful comment .. it really feels nice when your effort helps others ..
for youtube I would say .. download Internet Download Manager and activate advance browser integration .. and it would leach to any file on any site .. its cool .
[ Reply ]
Zuhaib
7 Oct 08 at 2:34 am
o yeah,bitcomet plug in allows download in you tube
[ Reply ]
NIP
18 Oct 08 at 4:26 pm
Zuhaib, thank you for this program. Is it possible for you to do another program to download from http://www.imeem.com ? The quality of mp3s of this site is VERY GOOD. Thanks.
[ Reply ]
dr5
25 Oct 08 at 5:23 pm
[...] – bookmarked by 4 members originally found by Sucio on 2008-10-18 Esnips Trick Explained http://www.nerdpad.com/how-to/esnips-trick-explained/ – bookmarked by 6 members originally found by [...]
Bookmarks about Adserver
6 Nov 08 at 6:30 pm
Давно хотел у вас спросить, автор, вы где живёте? В смысле города? Если не серкет:)
Translation:(Google)
It has long wanted you to ask the author, where you live? In terms of cities? If not serket:)
[ Reply ]
Laguna
2 Jan 09 at 12:01 am
@Laguna
I guess you are asking where do I live..
I am from Orissa, India .. currently working at Chennai, India
[ Reply ]
Zuhaib
2 Jan 09 at 6:50 am
@dr5
imeeme.com never allows you to play songs anonymously .. you need to be a registered user .. well thats not a problem ..
The problem is imeem.com streams in swf format .. which means .. they embed songs inside swf files and then stream the swf file .. so the file that is streamed is just a swf (Flash) file ..
It is possible to download that swf file .. but then you would need to extract the song out of the swf file ..
Note: I have not done any research on this as of now .. but for sure the do this .. will definitely try to find out once I have free time
[ Reply ]
Zuhaib
2 Jan 09 at 6:55 am
Just dropped in to put a word of thanks (a ton) for the awesome generator, Zuhaib.
I trust your site alot more than that other generator. The other one looks shifty. My firefox WOT pluggin that detects malicious sites blocked the webpage it leads to when you generate the link. Thank God I found yours!
Great work!
[ Reply ]
599
3 Jan 09 at 6:44 pm
For imeem you can use this generator:
http://file2hd.com/Default.aspx
But it’ll be downloaded as a gif file and you hav to change the extension to mp3 ^^
For esnips, right here you get the best ever ^^
[ Reply ]
Rus
9 Jan 09 at 10:50 am
wow . i tried this generator thingy and it really works .i just wanted to say a thank – you to zuhaib .really .thanks ><
[ Reply ]
ShIKI
21 Feb 09 at 6:17 am
Awesome mayte… Cheers for the detailed explanation as well… really appreciate your effort to bring more music into our lives
- Gaggy
[ Reply ]
Gaggy
6 Mar 09 at 1:28 pm
Nice!
I love your flash generator Zuhaib.
Thanks a bunch!
[ Reply ]
Sha
7 Mar 09 at 11:11 am
assalam alekum
i have used your link generator many times and its very helpfull.
specially for people with slow net speed.
[ Reply ]
zamaan
16 Mar 09 at 3:00 pm
what an excellent zuhaib. Where do you stay at orissa????
[ Reply ]
Rohan
11 Apr 09 at 2:55 pm
I am from choudwar, cuttack .. but I am currently staying in chennai
[ Reply ]
Zuhaib
14 Apr 09 at 7:24 am
Dear Zuhaib,
Thank you very much for creating such a wonderful program. With your Link Generator, I have been able to download music files and enjoy them anytime and anywhere.
Today, I was trying to download the following mp3 file.
http://www.esnips.com/doc/9fb4a42c-1ece-4d53-82c6-ec3665bfd38a/Purano-Saee-Diner-Katha
When I used the generated link to download the file, it did not download the file but opened my default mp3 player and started playing the music.
Please help so that I can download the file.
Shadharon
[ Reply ]
Shadharon
3 Jul 09 at 3:32 pm
@Shadharon
Use firefox or disable the media player addon in your IE
[ Reply ]
Zuhaib
4 Jul 09 at 9:11 am
Dear Zuhaib,
It worked either way. Thank you very much.
Shadharon
[ Reply ]
Shadharon
4 Jul 09 at 7:04 pm
Hey zuhaib,
Thanks very much dude. U had sent me an email on my esnips account. At first I thought its some sort of HACKING. But wen i took risk and tried it, i became ur fan. U r an amazing man. I have used ur link many a times. It helped me a lot wen i found my favourite song but not the download option….
Keep it up buddy. And secondthing, I read one comment for youtube download. U have given the explanation but i know another youtube vedio downloader. If u download DVDVIDEOSOFT, u can download as well as upload on youtube.
to download the whole dvdvideosoft studio, click on the following link and download it.
http://www.dvdvideosoft.com/
[ Reply ]
Aniket
17 Aug 09 at 4:40 am
[...] as of today I am removing this application from this site, but I am leaving this post and the other post about eSnips intact as a [...]
Esnips Link Generator - How To Download Songs From Esnips | Zuhaib
1 Sep 09 at 5:19 am
Hi Zuhaib,
All people thanked you while the generator was alive and kicking. Lemme thank you now, it helped me download loads of music from esnips.
THANK YOU BUDDY, U R THE BEST
DUNCE
[ Reply ]
Dunce
9 Sep 09 at 3:56 pm