Jump to content
McKay Development

Import authcode from file while logOn


katayyayuci

Recommended Posts

Hi, I want to link a client to the other 5 .I want to tell a bot to login to the other 5 bot

 

But i have a issue right here.I was execute other 5 bot's with chatmessage and they need a steamguard codes.How can i import steamguard codes from an txt,json or any text. These codes will be disposable guard codes.

 

Here my old code (its should be still working)

 

mainbot.js

function splitString(steamID, message) 
{
    var arrayOfStrings = steamID.split(message); // HERE IM SPLITTING CODE FROM MSG EXAMPLE: !login xxxxx
    return arrayOfStrings[1];
}
var yourString = message; // OR ANY OTHER
var colon = " ";
var guardcode = splitString(yourString, colon); // SPLIT COLON
guardcode.toUpperCase();
module.exports = 
{
    acc1auth: guardcode
}
var acc1 = require('./acc1/bot.js')

acc1/bot.js

var logoncfg = {
	accountName: config.username,
	password: config.password,
	twoFactorCode: SteamTotp.generateAuthCode(cfg.shearedSecret)
}

client.logOn(logoncfg);


var mainaccimport= require('../mainbot.js');

client.on('steamGuard', function(domain, callback,) {
	if ( !cfg.sharedSecret ) {
		var readlineSync = require('readline-sync');
		var authCode = mainaccimport.acc1auth
		callback(authCode);	
	}
	else {
		var authCode = SteamTotp.generateAuthCode( cfg.sharedSecret );
		console.log("[" + cfg.username + "] Generated Auth Code: " + authCode);
		callback(authCode);	
	}
});
Edited by katayyayuci
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...