mIRC Home    About    Download    Register    News    Help

Print Thread
#106613 01/01/05 06:38 PM
Joined: Sep 2003
Posts: 29
M
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Sep 2003
Posts: 29
The amount of time I've spent on this is ridiculous. I tried so hard to get it to work before posting here and I can't believe I'm actually posting here and it still won't work. What I'm trying to do is login to gamefaqs.com . At this point I couldn't give a crap about error detection. For aliases I have this:

/login {
%imagine = 0
/sockclose *
/sockopen login gamefaqs.com 80
}

Remote:

on *:sockopen:login:{

sockwrite -n login POST /user/login.html HTTP/1.1
sockwrite -n login Host: www.gamefaqs.com
sockwrite -n login User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
sockwrite -n login Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
sockwrite -n login Accept-Language: en-us,en;q=0.5
sockwrite -n login Accept-Encoding: gzip,deflate
sockwrite -n login Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
sockwrite -n login Keep-Alive: 300
sockwrite -n login Connection: keep-alive
sockwrite -n login Referer: http://www.gamefaqs.com/

%thepath = path=http%3A%2F%2Fwww.gamefaqs.com%2F&EMAILADDR=<myemail>&PASSWORD=<mypassword>&x=13&y=11
%thepath2 = path=http://www.gamefaqs.com/&EMAILADDR=<myemail>&PASSWORD=<mypassword>&x=30&y=7

sockwrite -n login Content-Type: application/x-www-form-urlencoded
sockwrite -n login Content-Length: $len(%thepath2)
sockwrite -n login
sockwrite -n login %thepath2 $+ $crlf
sockwrite -n login

}

The thing is that Etherdetect gave me %thepath, which has some characters in hex with a % before them! So I swap between them every time I try something new. What I wrote is practically exactly what etherdetect tells me it's doing with Firefox. The rest of my script has to do with extracting the cookie and asking for the website again (using the cookie), but it still won't work frown Can someone please please tell me what I'm doing wrong? Why I'm adding all of that extra stuff is because I'm pretty sure gamefaqs are "illegally" trying to prevent anything but standard browsers from logging it, so I am trying to look like Firefox. Another thing is that I have a timer that waits for as little time will work to go off and gets the other page with the cookie.. so it opens up another connection (because I don't know how to do another request on the same one after the post), would there be problems there? btw, I'm pretty certain the &x=12&y=3 are just the x and y coordinates of the image you click.

.
.

#106614 01/01/05 10:04 PM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Why do you think you're doing anything wrong? I tried your code with valid login information and the server responded with an authentication cookie (Set-Cookie: MDAAuth=...)

#106615 02/01/05 01:01 AM
Joined: Sep 2003
Posts: 29
M
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Sep 2003
Posts: 29
It responds with an authentication cookie but it still doesn't register that you logged in at that time if you click on your name and check the last time you logged in. Even if you respond to the cookie similar to Firefox it won't register that you're logged in. I'm not sure there's anything wrong with that part of it but there could be. I'd really appreciate it if someone could figure out what to do please.
.
.

#106616 02/01/05 02:04 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
I had no problems here. The cookie seems to be valid. When I requested the main page with the authentication cookie, the server responded with "Welcome, <my name>."

Try the following script (/GF_login to begin):
http://members.lycos.co.uk/onln/files/GameFAQs.txt

#106617 02/01/05 02:58 AM
Joined: Sep 2003
Posts: 29
M
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Sep 2003
Posts: 29
Thanks again for your reply. Your code is more elegant than mine and more compatible with changes in what the server gives you. But if you notice it still doesn't actually log you on after all of that. If possible logout and then login under a different account, then click on your name and it will show that you haven't logged in when you did that with mirc. I don't know why it's doing this mad .. and it's not that you have to go around the boards or anything like that. Could you try using Etherdetect and see what on earth it does differently? I know it will work exclusively through port 80, so there is no need to bother with the other ports it opens. Again thanks and please try to help.

.

#106618 02/01/05 03:16 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Where can I see my last login time?

#106619 02/01/05 03:28 AM
Joined: Sep 2003
Posts: 29
M
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Sep 2003
Posts: 29
Quote:
Where can I see my last login time?


You'll have to make a post with one account. Then click on your name where you made the post using another account. Don't worry though, it's very very quick and easy to make another account now.

Last edited by MircMania; 02/01/05 03:29 AM.
#106620 02/01/05 04:41 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Indeed, the script failed to update the "last visit" entry on the user page. I guess it happens because the message board on GameFAQs is a separate system, and while it shares the user database with the rest of GameFAQs, its internal statistics are not affected by actions on pages that don't belong to it.

I have modified the script to request http://boards.gamefaqs.com/gfaqs/user.php instead of http://www.gamefaqs.com/ and now "last visit" seems to update correctly. You can download the script again and try.

#106621 02/01/05 05:20 AM
Joined: Sep 2003
Posts: 29
M
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Sep 2003
Posts: 29
Wow, thanks a million it's working now. grin I'll know what to try now the next time. Thanks again. cool

Last edited by MircMania; 02/01/05 05:22 AM.
#106622 02/01/05 05:34 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
You're welcome laugh


Link Copied to Clipboard