OutdatedCS:GO COMMEND BOT

Posts 115 of 100 · Page 1 of 7
CS:GO COMMEND BOT
CS:GO COMMEND BOT



INSTRUCTIONS

Code:
CSGO Commend Bot
You are viewing an experimental branch including a commend bot rewrite. Use with caution.
If you're a developer and want to know how to fix your own commend bot its very simple. Just set steam_id_gs to a valid server steam ID, on your target's account & bot accounts. Switch after 20 commends and repeat.

Restrictions
Valve changed it so that you now need to be on a server before you can commend someone. There also is a limit of the amount of commends you can send per server, that limit is set to 20. Due to this you need your targets Steam details, so you can login and change server after 20 commends. This also heavily impacts speed.

This version has a major issue
Typically after ~20 commends it stops working all together, despite closing Steam connection and relogging. Sometimes it works for a little more, most of the time it doesn't. You can do another 20 after restarting the script.

Future

  • Add back the colors
  • Add the ability to remove commends
  • Add the ability to commend three times with one account per 24 hours instead of once every 8 hours
Requirements Installation
  1. Download
  2. Put it all in a folder
  3. Open a command prompt inside the folder
  4. Enter npm install
  5. Rename config.json.example to config.json and adjust it
  6. Add accounts using the
  7. Run node index.js
Config
  • commend:
    • friendly Boolean: Whether or not to commend as friendly
    • teaching Boolean: Whether or not to commend as teaching
    • leader Boolean: Whether or not to commend as leader
  • account:
    • username String: Username of the account you want to boost
    • password String: Pasword of the account you want to boost
    • sharedSecret String: Optional shared secret if the account has two factor authentication
  • method String: Define the method - Valid values: LOGIN & SERVER
  • target String: SteamID/VanityURL/ProfileURL of target
  • matchID String: Optional match ID, typically just "0" anyways - I always use "0".
  • toSend Number: Amount of commends you want to send
  • cooldown Number: Cooldown in milliseconds to not reuse accounts - Currently set to 8 hours
  • betweenChunks Number: Cooldown in milliseconds between chunks - (I recommend a minimum of 240000 (4 minutes))
  • steamWebAPIKey String: Steam Web API key from here
Database Manager
  • Export account list: Export all accounts in a username:password format
  • List commends for user: List all accounts which have commended a specific user
  • Reset commends for user: Delete all commend entries from the database of a specific user
  • Remove account from database: Delete a specific account from the database including commend history
  • Add account(s) to database: Add accounts to the database, import from JSON file, import from username:passwordfile or manually add accounts
  • List not working accounts: List all accounts which are marked as inoperational by the script
  • Reset Database: Will clear out all content of the database, resetting it to the default
  • Exit: Safely close database before exiting process
Then simple run it via node databaseManager.js, use the arrow keys & enter to navigate. Read on-screen instructions for more details. Botting Method You can choose between two botting methods, LOGIN and SERVER.
  • LOGIN will log into the targets account and automatically grab a server. account object must be filled with account details. Will ignore target & serverID.
  • SERVER will assume the target is on the defined server. serverID must be either a ServerIP including port or a direct ServerID. Will ignore account.
[CENTER]VirusTotal
https://www.virustotal.com/gui/file/...4f61/detection
Credit to BeepFelix for making this.
CommendBot_mpgh.net.zip413 KB · 1,786 downloads Clean
//Approved, thanks for sharing and giving credits.

Removed github link as its not allowed.
Is there any video tutorial about this? I am more into visual than words, it would be big help if you have. Thank you alot more power to you
Add accounts using the
Atleast try to finish the statement, otherwise your "modified" script is useless..
It gives a timeout error. This got patched months ago, why are u posting this now
works fine for me fam I got 1000 commends like a week ago from it

- - - Updated - - -

Is there any video tutorial about this? I am more into visual than words, it would be big help if you have. Thank you alot more power to you
Rename config.json.example to config.json.
Edit the config to the appropriate information.
Open a cmd in the folder.
Execute 'npm install'. (assuming you have installed node.js)
Execute 'node databaseManager.js'.
Add accounts.
Exit databaseManager.js.
Execute 'node index.js'. (config file filled out entirely)
Make sure CS:GO is closed.

Done and hopefully, this helped!
Quote Originally Posted by CraftedChamp. View Post
works fine for me fam I got 1000 commends like a week ago from it

- - - Updated - - -



Rename config.json.example to config.json.
Edit the config to the appropriate information.
Open a cmd in the folder.
Execute 'npm install'. (assuming you have installed node.js)
Execute 'node databaseManager.js'.
Add accounts.
Exit databaseManager.js.
Execute 'node index.js'. (config file filled out entirely)
Make sure CS:GO is closed.

Done and hopefully, this helped!
It gives an error when we try to "npm install", something is missing inside the folder. I've tested with the latest version of it and gives a timeout error when i type "node index.js"
Quote Originally Posted by ferreiravfx1 View Post
It gives an error when we try to "npm install", something is missing inside the folder. I've tested with the latest version of it and gives a timeout error when i type "node index.js"
Replace the 'index.js' file with this code -

Code:
const sqlite = require("sqlite");
const ChildProcess = require("child_process");
const path = require("path");
const Helper = require("./helpers/Helper.js");
const Target = require("./helpers/Target.js");
const config = require("./config.json");
process.setMaxListeners(35);
require('events').EventEmitter.defaultMaxListeners = 35;
process.on("unhandledRejection", console.error);
process.on("uncaughtException", console.error);

let db = undefined;

(async () => {
	console.log("Checking for new update...");
	try {
		let package = require("./package.json");
		let res = await Helper.GetLatestVersion().catch(console.error);

		if (package.version !== res) {
			let repoURL = package.repository.url.split(".");
			repoURL.pop();
			console.log("A new version is available on Github @ " + repoURL.join(".") + " (Make sure to switch to the \"experimental\" branch first before downloading");
			console.log("Downloading is optional but recommended. Make sure to check if there are any new values to be added in your old \"config.json\"");
		} else {
			console.log("Up to date!");
		}
	} catch (err) {
		console.error(err);
		console.log("Failed to check for updates");
	}

	console.log("Opening database...");
	db = await sqlite.open("./accounts.sqlite");

	await Promise.all([
		db.run("CREATE TABLE IF NOT EXISTS \"accounts\" (\"username\" TEXT NOT NULL UNIQUE, \"password\" TEXT NOT NULL, \"sharedSecret\" TEXT, \"lastCommend\" INTEGER NOT NULL DEFAULT -1, \"operational\" NUMERIC NOT NULL DEFAULT 1, PRIMARY KEY(\"username\"))"),
		db.run("CREATE TABLE IF NOT EXISTS \"commended\" (\"username\" TEXT NOT NULL REFERENCES accounts(username), \"commended\" INTEGER NOT NULL, \"timestamp\" INTEGER NOT NULL)")
	]);

	let amount = await db.get("SELECT COUNT(*) FROM accounts WHERE operational = 1;");
	console.log("There are a total of " + amount["COUNT(*)"] + " operational accounts");
	if (amount["COUNT(*)"] < config.toSend) {
		console.log("Not enough accounts available, got " + amount["COUNT(*)"] + "/" + config.toSend);
		return;
	}

	console.log("Logging into target account...");
	let targetAcc = new Target(config.account.username, config.account.password, config.account.sharedSecret);
	await targetAcc.login();

	let accountsToUse = await db.all("SELECT accounts.username, accounts.password, accounts.sharedSecret FROM accounts LEFT JOIN commended ON commended.username = accounts.username WHERE accounts.username NOT IN (SELECT username FROM commended WHERE commended = " + targetAcc.accountid + " OR commended.username IS NULL) AND (" + Date.now() + " - accounts.lastCommend) >= " + config.cooldown + " AND accounts.operational = 1 GROUP BY accounts.username LIMIT " + config.toSend);
	if (accountsToUse.length < config.toSend) {
		console.log("Not enough accounts available, got " + accountsToUse.length + "/" + config.toSend);
		await targetAcc.logOff();
		return;
	}

	console.log("Chunking " + accountsToUse.length + " account" + (accountsToUse.length === 1 ? "" : "s") + " into groups of 20...");
	let chunks = Helper.chunkArray(accountsToUse, 20); // Chunks are now hardcoded to 20 due to 20 commends being the limit per server

	console.log("Loading sever list...");
	let servers = await Helper.GetServerList(config.steamWebAPIKey);
	console.log("Got " + servers.length + " server" + (servers.length === 1 ? "" : "s"));

	let serverToUse = undefined;
	for (let i = 0; i < chunks.length; i++) {
		serverToUse = servers.shift();

		console.log("Checking server " + serverToUse.steamid + " for online status");
		let res = await Helper.ParseServerID(serverToUse.steamid, config.steamWebAPIKey).catch(() => { });
		if (typeof res !== "string") {
			console.log("Skipping server " + serverToUse.steamid + " because they are offline");
			i -= 1;
			continue;
		}

		console.log("Switching server ID to " + serverToUse.steamid);
		targetAcc.setGamesPlayed(serverToUse.steamid);

		console.log("Logging in on chunk " + (i + 1) + "/" + chunks.length);

		// Do commends
		let result = await handleChunk(chunks[i], targetAcc.accountid, serverToUse.steamid);
		console.log("Chunk " + (i + 1) + "/" + chunks.length + " finished with " + result.success.length + " successful commend" + (result.success.length === 1 ? "" : "s") + " and " + result.error.length + " failed commend" + (result.error.length === 1 ? "" : "s"));

		// Wait a little bit and relog target if needed
		if ((i + 1) < chunks.length) {
			console.log("Waiting " + config.betweenChunks + "ms and relogging account...");
			await Promise.all([
				new Promise(r => setTimeout(r, config.betweenChunks)),
				targetAcc.relog()
			]);
		}
	}

	// We are done here!
	await targetAcc.logOff();
	await db.close();
	console.log("Done!");
})();

function handleChunk(chunk, toCommend, serverSteamID) {
	return new Promise(async (resolve, reject) => {
		let child = ChildProcess.fork("./Bots.js", [], {
			cwd: path.join(__dirname, "helpers"),
			execArgv: process.execArgv.join(" ").includes("--inspect") ? ["--inspect=0"] : []
		});

		child.on("error", console.error);

		let res = {
			success: [],
			error: []
		};

		child.on("message", async (msg) => {
			if (msg.type === "ready") {
				child.send({
					config: config,
					chunk: chunk,
					toCommend: toCommend,
					serverSteamID: serverSteamID
				});
				return; 
			}

			if (msg.type === "error") {
				console.error("The child has exited due to an error", msg.error);
				return;
			}

			if (msg.type === "logging") {
				console.log("[" + msg.username + "] Logging into Steam");
				return;
			}

			if (msg.type === "loggedOn") {
				console.log("[" + msg.username + "] Logged onto Steam - GC Time: " + new Date(msg.hello.rtime32_gc_welcome_timestamp * 1000).toLocaleString());
				return;
			}

			if (msg.type === "commended") {
				await db.run("UPDATE accounts SET lastCommend = " + Date.now() + " WHERE username = \"" + msg.username + "\"").catch(() => { });

				if (msg.response.response_result !== 1) {
					res.error.push(msg.response);

					console.log("[" + msg.username + "] Commended but got invalid success code " + msg.response.response_result + " (" + (res.error.length + res.success.length) + "/" + chunk.length + ")");
					return;
				}

				res.success.push(msg.response);

				console.log("[" + msg.username + "] Successfully sent a commend with response code " + msg.response.response_result + " - Remaining Commends: " + msg.response.tokens + " (" + (res.error.length + res.success.length) + "/" + chunk.length + ")");

				await db.run("INSERT INTO commended (username, commended, timestamp) VALUES (\"" + msg.username + "\", " + toCommend + ", " + Date.now() + ")").catch(() => { });
				return;
			}

			if (msg.type === "commendErr") {
				res.error.push(msg.error);

				console.log("[" + msg.username + "] Failed to commend (" + (res.error.length + res.success.length) + "/" + chunk.length + ")");

				await db.run("UPDATE accounts SET lastCommend = " + Date.now() + " WHERE username = \"" + msg.username + "\"").catch(() => { });
				return;
			}

			if (msg.type === "failLogin") {
				res.error.push(msg.error);

				console.log("[" + msg.username + "] Failed to login and has been marked as invalid (" + (res.error.length + res.success.length) + "/" + chunk.length + ")");

				await db.run("UPDATE accounts SET operational = 0 WHERE \"username\" = \"" + msg.username + "\"");
				return;
			}
		});

		child.on("exit", () => {
			resolve(res);
		});
	});
}
Keep giving errors. The latest version of the commend bot doesn't give errors during npm install, but when i run the bot it gives a timeout error and doesn't send the commends
Quote Originally Posted by ferreiravfx1 View Post
Keep giving errors. The latest version of the commend bot doesn't give errors during npm install, but when i run the bot it gives a timeout error and doesn't send the commends
Yeah I know I just posted the old index.js file code and which i just tried on this commend bot and it works perfectly fine
Error: Cannot find module 'sqlite'
Require stack:
index.js
Let me try this out, thanks for sharing btw
Can you make video tutorial please for windows users?
Posts 115 of 100 · Page 1 of 7
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?