Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var account_name = '';
- var password = '';
- var shared_secret = '';
- var identity_secret = '';
- var fs = require('fs');
- var crypto = require('crypto');
- var Steam = require('steam');
- var SteamWebLogOn = require('steam-weblogon');
- var SteamTotp = require('steam-totp');
- var SteamCommunity = require('steamcommunity');
- var two_factor_code = SteamTotp.generateAuthCode(shared_secret);
- var steamClient = new Steam.SteamClient();
- var steamUser = new Steam.SteamUser(steamClient);
- var steamWebLogOn = new SteamWebLogOn(steamClient, steamUser);
- var community = new SteamCommunity();
- steamClient.connect();
- steamClient.on('connected', function () {
- steamUser.logOn({ account_name: account_name, password: password, two_factor_code: two_factor_code });
- });
- steamClient.on('logOnResponse', function (logonResp) {
- if (logonResp.eresult == Steam.EResult.OK) {
- console.log('zalogowano1');
- steamWebLogOn.webLogOn(function (sessionID, newCookie) {
- console.log('zalogowano2');
- community.setCookies(newCookie);
- community.startConfirmationChecker(10000, identity_secret);
- });
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement