mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2003
Posts: 64
M
Babel fish
OP Offline
Babel fish
M
Joined: Jan 2003
Posts: 64
This script, if it could be completed would be immensely useful.

Basically this is a shot in the dark. I haven't had a lot of experience with server-side FORM/POST processing and so I'm not even sure what order/format the posts would take.

The main challenges:
* logging in and
* making it think you have a cookie

on *:sockopen:FB:{
echo 12 @FB -- Socket now open --
{ var %%%webpage = /index.php | var %%%http = HTTP/1.1 }

var %%%out.message = email=test@email pass=testpass

var %s = sockwrite -n $sockname
%s POST /login.php HTTP/1.1
%s Referer: http://myschool.facebook.com/index.php
%s Host: myschool.facebook.com
%s Content-Type: application/x-www-form-urlencoded
%s Content-Length: $len(%%%out.message)
%s Connection: Keep-Alive
%s Cache-Control: no-cache
%s
%s %%%out.message

echo 4 @FB -- end for now --
}

It would be amazingly useful if it could be completed. The goal is to be able to read facebook search pages/etc from script.

There was a thread similar to this by h4z4rd a few days back, but the issues are a little more broad than in his post; also I'm wondering if it's possible to tell what the browsers are saying to the server. That would make it a lot eaier...

Joined: Apr 2004
Posts: 218
P
Fjord artisan
Offline
Fjord artisan
P
Joined: Apr 2004
Posts: 218
Having experience with server side scripting.
Try looking up the name for the 'submit' button on the login page.
I know some sites might if (isset($_POST['submit'])).. to see if someone has 'submitted' a form.

(I went to face book and I found the form)

I revised your SOCKREAD code some..
Here is what the outmessage looks like:
var %out.message = email=test@email&pass=testpass&login=Login

Also when submitting more then one form value seperate them by a &
Example:
var %post = username=SuperMan007&passwd=kryptonite


on *:sockopen:FB:{
if ($sockerr) { echo 4 @FB -- Socket Error! -- }
echo 12 @FB -- Socket now open --

var %out.message = email=test@email&pass=testpass&login=Login

var %s = sockwrite -n $sockname
%s POST /login.php HTTP/1.1
%s Referer: http://www.facebook.com/index.php
%s Host: facebook.com
%s Content-Type: application/x-www-form-urlencoded
%s Content-Length: $len(%out.message)
%s Connection: Keep-Alive
%s Cache-Control: no-cache
%s
%s %out.message

echo 4 @FB -- end for now --
}


Live to Dream & Dream for Life
Joined: Jan 2003
Posts: 64
M
Babel fish
OP Offline
Babel fish
M
Joined: Jan 2003
Posts: 64
Okay so, with that code I think we've managed to get the login working. The last issue would seem to be the cookies.

" Cookies are not enabled on your browser. Please adjust this in your security preferences before continuing. "


Link Copied to Clipboard