Jump to content


Photo

Import authcode from file while logOn


  • Please log in to reply
No replies to this topic

#1 katayyayuci

katayyayuci

    Newbie

  • Member
  • Pip
  • 3 posts

Posted 14 May 2018 - 09:45 PM

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, 14 May 2018 - 09:46 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users