Page 15 of 33

Re: Lyricator - Batch Lyrics Updater v1.00 [MM3]

Posted: Sat Aug 14, 2010 7:10 am
by Semmetju
What we need to do is retrieve this url: "http://www.lyricsplugin.com/winamp03/pl ... No%20Limit"
Which contains this source code:

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" type="text/css" href="http://www.lyricsplugin.com/winamp03/css/plugin.css" />
    <script language="javascript" type="text/javascript" src="http://www.lyricsplugin.com/winamp03/javascript/plugin.js"></script>
    <script language="javascript" type="text/javascript" src="http://www.lyricsplugin.com/winamp03/plugin/content.js"></script>
</head>
<body onload="javascript:getContent('2%20Unlimited', 'No%20Limit', '1281787161', '57e3560a92d91d00754b6a1ddbf3c453')">
<div id="content">

<div id="title">
&nbsp;
</div>

<div id="artist">
&nbsp;
</div>

<div id="lyrics">
<a href="http://www.lyricsvip.com/" target="_blank">http://www.lyricsvip.com</a>
</div>

</div>
</body>
</html>
The source for the getContent function is this:

Code: Select all

function getContent(artist, title, time, check)
{ 
    xmlHttp = GetXmlHttpObject();
    if(xmlHttp == null)
     {
        return;
     }
    var url = "content.php?artist=" + artist + "&title=" + title + "&time=" + time + "&check=" + check;
    xmlHttp.onreadystatechange = stateChanged;
    xmlHttp.open("GET", url, true);
    xmlHttp.send(null);
}
So our url will become http://www.lyricsplugin.com/winamp03/pl ... 9132c3734b

And we will have to automate all this...

EDIT: And ofcourse the referer has to be correct.

Re: Lyricator - Batch Lyrics Updater v1.00 [MM3]

Posted: Sat Aug 14, 2010 9:32 am
by ripken204
that lyrics site no longer works though, that is the problem.
correct me if i am wrong.

Re: Lyricator - Batch Lyrics Updater v1.00 [MM3]

Posted: Sat Aug 14, 2010 10:21 am
by Guest
ripken204 wrote:that lyrics site no longer works though, that is the problem.
correct me if i am wrong.
Yeah it does ;)
http://www.lyricsplugin.com/winamp03/pl ... 0Unlimited

Re: Lyricator - Batch Lyrics Updater v1.00 [MM3]

Posted: Sat Aug 14, 2010 10:27 am
by Semmetju
Guest wrote:
ripken204 wrote:that lyrics site no longer works though, that is the problem.
correct me if i am wrong.
Yeah it does ;)
http://www.lyricsplugin.com/winamp03/pl ... 0Unlimited
They just added extra security, don't ask me why... :(

Re: Lyricator - Batch Lyrics Updater v1.00 [MM3]

Posted: Sat Aug 14, 2010 12:38 pm
by Semmetju
Getting close to getting this baby to work, just some more debugging to do with WireShark... :D

Re: Lyricator - Batch Lyrics Updater v1.00 [MM3]

Posted: Sat Aug 14, 2010 2:12 pm
by guest
If you want to post your progress, I'd be happy to help. I was working on it just last night building samples with wireshark, analyzing packets from the WMP plugin to see if I could determine the naming conventions they used. I'm just a bit sketchy on the javascript end (haven't written anything in that since college). There was one packet sent each time that had me a bit stumped, perhaps an authentication, or maybe just a checksum for the files, I don't know, nothing it's nothing significant. If you've overcome any of that, this could be getting close. If not, it may be easier to use another source API.

Re: Lyricator - Batch Lyrics Updater v1.00 [MM3]

Posted: Sat Aug 14, 2010 4:00 pm
by Vyper
Has anyone touched base with Owyn since this is essentially his script now?

Re: Lyricator - Batch Lyrics Updater v1.00 [MM3]

Posted: Sat Aug 14, 2010 4:21 pm
by trixmoto
I certainly got the impression from him that he was working on a new version...
Owyn wrote:I know what the problem is, the response now uses an onload event. However, I still don't know how to solve it. Back to RTFM and testing.
We discussed a few solutions after this so I assumed he was trying them out.

Re: Lyricator - Batch Lyrics Updater v1.00 [MM3]

Posted: Sat Aug 14, 2010 5:46 pm
by Semmetju
Hey guys, i can't work on this right now cause i've been drinking :lol: cant really focus right now. I believe the only problem left is the referer header. Check it out.
http://pastebin.com/wK2TTTR7

Re: Lyricator - Batch Lyrics Updater v1.00 [MM3]

Posted: Sun Aug 15, 2010 6:15 am
by Semmetju
Hmm,
Looks like a bug in MooTools or something.
Can't get it to set the Referer header, it just shows up blank in wireshark.

Removed a sloppy workaround:
http://pastebin.com/FNFm3LY9

Re: Lyricator - Batch Lyrics Updater v1.00 [MM3]

Posted: Sun Aug 15, 2010 6:57 am
by Semmetju
Seems like the bug lies even deeper... :(
MooTools adds all the headers nicely, but somehow they just wont show up properly.
Does anyone have any experience with this?

Re: Lyricator - Batch Lyrics Updater v1.00 [MM3]

Posted: Sun Aug 15, 2010 7:35 am
by Semmetju
We're screwed... :(

Take a look here:
http://support.microsoft.com/kb/178066
Specifically this part:
The Referer header also will not be sent when the link is from a non-HTTP(S) protocol, such as file://, to another page.
*Sigh*
How are we gonna fix this?

Re: Lyricator - Batch Lyrics Updater v1.00 [MM3]

Posted: Sun Aug 15, 2010 4:29 pm
by Semmetju
Ok, guys.
All we need now is a favor from someone who is willing to upload this php script to his server...
http://pastebin.com/tUKaSAHJ

And then adjust this script accordingly (changing the http://www.somewebserver.com/get.php part to the correct URL)
http://pastebin.com/nqxfLw1D

I just tried it on my homeserver and it is working 100% :D

Re: Lyricator - Batch Lyrics Updater v1.00 [MM3]

Posted: Sun Aug 15, 2010 5:16 pm
by nynaevelan
Vyper wrote:Has anyone touched base with Owyn since this is essentially his script now?
I agree, this is an active script with an active scripter, should it be taken over by someone else without his knowledge or consent??

Re: Lyricator - Batch Lyrics Updater v1.00 [MM3]

Posted: Sun Aug 15, 2010 5:46 pm
by Semmetju
nynaevelan wrote:
Vyper wrote:Has anyone touched base with Owyn since this is essentially his script now?
I agree, this is an active script with an active scripter, should it be taken over by someone else without his knowledge or consent??
I just fixed it cause I needed it for myself.
This is meant to be just a quick fix, and if Owyn wants to use my stuff, he is free to do so...