Immediately to the problem ...
For example, have site -
www.mysite.com
On the authorization form, the code:
code:
<form name="auth">
<input type="text" name="user" />
<input type="password" name="password" />
<input type="checkbox" name="rem" value="1" />
<input type="hidden" name="rnd" value="123" />
<input type="hidden" name="a" value="2" />
<input type="hidden" name="ajax" value="1" />
<input type="submit" name="sbm" value="sbm" />
</form>
And...
code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message) {
if (Message.substr(0,5) === '/auth'){
botAuth(Message.substr(5,100).split('/')[0], Message.substr(5,100).split('/')[1]);
return '';
}
}
function botAuth(acc, pass){
var webAuth = new ActiveXObject("Microsoft.XMLHTTP");
with(webAuth){
open('GET','http://www.mysite.com?' + Math.random(), false); send();
var x = responseText.indexOf('name="rnd" value="')+'name="rnd" value="'.length;
rnd_value = responseText.substring(x,responseText.indexOf('"',x));
open('POST', 'http://www.mysite.com', true);
send('user=' + acc + '&password=' + pass + '&rem=1&a=2&ajax=1&rnd=' + rnd_value);
}
}
Auth command:
quote:
/auth account/password
Don't know why, but don't working...
Only yesterday, the primary explore scripting in Messenger Plus ...