More socket trouble... - 01/01/05 06:38 PM
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 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.
.
.
/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 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.
.
.