Hey i won't be continuing this bot thats why am releasing the source i got bored of OverSoul thinking about making an epic duel one later
So this is pretty messy but clean at the same time how? i dont know haven't optimized it and i just started getting in to Node.js so the code can be well optimized really.
I can re make this in php and it can be really clean but PHP is not that good with sockets really.
So what this does and what can it do.
Well since your using sockets you can do anything from finding exploits to sending packets example i was able to spam the server with 100 chat messages then get kicked instantly re connect and spam again yes that code is in there.
What i was able to do is join a battle yes you can make a auto battle bot i guess haven't tried.
You can do pretty cool stuff also loadshop buy etc.
Just need to know the packets i capture packets with my own program
Picture:
Proof it works:
Code:
var readline = require('readline');
var request = require('request');
var net = require('net');
var IP = "75.126.77.10", Password = "", Email = "", strToken = "";
var playerID = 0, MASID = 0, port = 843;
var client = new net.Socket();
LetsLogin("Your Email / Username", "Your Password");
var rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
function ConnectOS() {
LetsConnect();
client.on('data', function (data) {
console.log('[RECEIVED]: ' + data);
handlePackets(data);
});
ConnectAgain();
}
function LetsConnect() {
clien*****nnect(port, IP, function () {
console.log('Connected To ' + IP + ":" + port + "\n");
sendPacket("<policy-file-request/>");
});
}
function LetsClose() {
client.on('close', function () {
client.destroy();
console.log('Connection closed');
process.exit(1);
});
}
function ConnectAgain() {
client.on('close', function () {
client.destroy();
console.log('Connection closed');
LetsConnect();
});
}
function sendPacket(data) {
var NewData = data.toString();
var Packet = NewData + "\x00";
client.write(Packet);
console.log("[SENT]: " + Packet + "\n")
}
function handlePackets(packet) {
if (checkString(packet, "<cross-domain-policy>")) {
sendPacket('{"Token":"' + strToken + '","id":' + playerID + ',"type":"login"}');
} else if (checkString(packet, 'status":1')) {
rl.question("", function (answer) {
if (checkUIn(answer, "chatspam")) {
console.log("Simple Chat Spam.");
var i = 0, spam = 100;
while (i < spam) {
sendPacket('{"type":"chat","cmd":"m","senderName":"Troll","roomID":2,"body":"Why So Mad?"}');
sendPacket('{"type":"chat","cmd":"m","senderName":"Troll","roomID":2,"body":"Sux?"}');
sendPacket('{"type":"chat","cmd":"m","senderName":"Troll","roomID":2,"body":"ME?"}');
i++;
}
} else if (checkUIn(answer, "quit")) {
rl.close();
console.log("closed input.");
LetsClose();
} else if (checkUIn(answer, "battle")) {
console.log("Starting A Battle");
sendPacket('{"body":55,"type":"join","cmd":"region"}');
}
});
}
}
function checkUIn(answer, data) {
return answer === data;
}
function checkString(packet, strings) {
var Data = packet.toString();
return Data.indexOf(strings) > -1;
}
function LetsLogin(Emails, password) {
Password = password.toString();
Email = Emails.toString();
console.log("Email: " + Email);
console.log("Password: " + Password);
request.post({url:'http://oversoul.arti*****m/web/AccountLoad.aspx',
headers: {
'Host': 'oversoul.arti*****m',
'Origin': 'http://oversoulcdn.arti*****m',
'Referer': 'http://oversoulcdn.arti*****m/game/OSGame0_9_4d21.swf',
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.134 Safari/537.36',
'X-Requested-With': 'ShockwaveFlash/18.0.0.209',
'Content-Type': 'application/x-www-form-urlencoded'},
json: {
strPassword: password.toString(),
strUsername: Emails.toString()
}},
function(err,httpResponse,body){
if (body.toString().indexOf("Ok")) {
playerID = body['playerID'];
MASID = body['MASID'];
strToken = body['strToken'];
ConnectOS();
}
});
}
Enjoy nothing is impossible just keep that in mind.