Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. var Steam = require('steam');
  2. var SteamTotp = require('steam-totp');
  3. var bot = new Steam.SteamClient();
  4. var shared_secret = '';
  5. var MobileAuthCode = '';
  6.  
  7. setTimeout(function()
  8. {
  9. if(shared_secret == '')
  10. {
  11. console.log('[2FA IDLER] No shared_secret found. Please insert it into the code');
  12. }
  13. else
  14. {
  15. console.log('[2FA IDLER] shared_secret found. Generating twoFactorCode');
  16. var MobileAuthCode = SteamTotp.generateAuthCode(shared_secret);
  17. };
  18.  
  19. //Login
  20. console.log('[2FA IDLER] Logging in.');
  21. bot.logOn({
  22. accountName: '',
  23. password: '',
  24. twoFactorCode: MobileAuthCode
  25. });
  26.  
  27. //Boost
  28. bot.on('loggedOn', function() {
  29. console.log('[2FA IDLER] Logged in.');
  30. bot.setPersonaState(Steam.EPersonaState.Online);
  31. console.log('[2FA IDLER] Boosting hours...');
  32. bot.gamesPlayed([730]);
  33. });
  34. }, 10000);
  35.  
  36.  
  37. //Error output
  38. bot.on('error', function(e)
  39. {
  40. console.log('[2FA IDLER] ERROR - Script stopped');
  41. if (e.eresult == Steam.EResult.InvalidPassword)
  42. {
  43. console.log('Reason: invalid password');
  44. }
  45. else if (e.eresult == Steam.EResult.AlreadyLoggedInElsewhere)
  46. {
  47. console.log('Reason: already logged in elsewhere');
  48. }
  49. else if (e.eresult == Steam.EResult.AccountLogonDenied)
  50. {
  51. console.log('Reason: logon denied - steam guard error');
  52. }
  53. else if (e.eresult == Steam.EResult.TwoFactorCodeMismatch)
  54. {
  55. console.log('Reason: Mobile code isnt correct');
  56. }
  57. else if (e.eresult == Steam.EResult.LoggedInElsewhere)
  58. {
  59. console.log('Reason: Logged in elsewhere');
  60. }
  61. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement