Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var Steam = require('steam');
- var SteamTotp = require('steam-totp');
- var bot = new Steam.SteamClient();
- var shared_secret = '';
- var MobileAuthCode = '';
- setTimeout(function()
- {
- if(shared_secret == '')
- {
- console.log('[2FA IDLER] No shared_secret found. Please insert it into the code');
- }
- else
- {
- console.log('[2FA IDLER] shared_secret found. Generating twoFactorCode');
- var MobileAuthCode = SteamTotp.generateAuthCode(shared_secret);
- };
- //Login
- console.log('[2FA IDLER] Logging in.');
- bot.logOn({
- accountName: '',
- password: '',
- twoFactorCode: MobileAuthCode
- });
- //Boost
- bot.on('loggedOn', function() {
- console.log('[2FA IDLER] Logged in.');
- bot.setPersonaState(Steam.EPersonaState.Online);
- console.log('[2FA IDLER] Boosting hours...');
- bot.gamesPlayed([730]);
- });
- }, 10000);
- //Error output
- bot.on('error', function(e)
- {
- console.log('[2FA IDLER] ERROR - Script stopped');
- if (e.eresult == Steam.EResult.InvalidPassword)
- {
- console.log('Reason: invalid password');
- }
- else if (e.eresult == Steam.EResult.AlreadyLoggedInElsewhere)
- {
- console.log('Reason: already logged in elsewhere');
- }
- else if (e.eresult == Steam.EResult.AccountLogonDenied)
- {
- console.log('Reason: logon denied - steam guard error');
- }
- else if (e.eresult == Steam.EResult.TwoFactorCodeMismatch)
- {
- console.log('Reason: Mobile code isnt correct');
- }
- else if (e.eresult == Steam.EResult.LoggedInElsewhere)
- {
- console.log('Reason: Logged in elsewhere');
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement