chu4
New Member
chu4____x | Kabooom!
Posts: 8
32 / /
Joined: Jun 2009
|
O.P. RE: [help] Auth for the site, via msn
Full code...
code: var xcinemaData = new ActiveXObject("Microsoft.XMLHTTP");
function OnEvent_Initialize(MessengerStart){
command = 'bot'
bot_name = 'xbot';
server_url = 'xcinema.net';
patch = 'mchat';
}
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind){
if ( MessageKind == 1 && Message.substr(0,5) == 'chat:' ){
sendData('[msn] ' + Origin, Message.substr(6,666666));
}
}
function OnEvent_ChatWndSendMessage(ChatWnd, Message) {
if (Message.substr(0,9) === '/' + command + ' chat'){
sendData(bot_name, Message.substr(9,666666));
return '';
} else if (Message.substr(0,9) === '/' + command + ' auth'){
botAuth(Message.substr(9,100).replace(/ /ig, '').split('/')[0], Message.substr(9,100).replace(/ /ig, '').split('/')[1]);
return '';
}
}
function sendData(user, mess){
with(xcinemaData){
open('GET','http://' + server_url + '/' + patch + '/?' + Math.random(), false); send();
var input = responseText.indexOf('name="s" value="')+'name="s" value="'.length;
ssid = responseText.substring(input,responseText.indexOf('"',input));
open('POST', 'http://' + server_url + '/' + patch + '/', true);
send('uname='+user+'&message='+mess+'&s='+ssid+'&ajax=1&a=8&numa=0&a=8');
}
}
function botAuth(acc, pass){
with(xcinemaData){
open('GET','http://' + server_url + '/?' + Math.random(), false); send();
var x = responseText.indexOf('name="rnd" value="')+'name="rnd" value="'.length;
rnd_value = responseText.substring(x,responseText.indexOf('"',x));
var data = 'user=' + acc + '&password=' + pass + '&rem=1&a=2&ajax=1&rnd=' + rnd_value;
open('POST', 'http://' + server_url, true);
setRequestHeader("Content-type", "application/x-www-form-urlencoded");
setRequestHeader("Content-length", data.length);
setRequestHeader("Connection", "close");
send(data);
}
}
This post was edited on 06-11-2009 at 06:12 PM by chu4.
|
|