sexydog
-
Posts
3 -
Joined
-
Last visited
Posts posted by sexydog
-
-
Thanks for your reply here is my code:
var fs = require("fs"), Steam = require("steam"), SteamUser = require("steam-user"), //SteamID = require("steamid"), SteamClients = {}, SteamUsers = {}, SteamFriends = {}; var text = fs.readFileSync("accounts.json").toString(); var accounts = JSON.parse(text)["accounts"]; accounts.forEach(doTheStuff); function doTheStuff(element,indexElement,array) { //console.log(element["username"] + ": " + element["password"]); SteamClients[indexElement] = new Steam.SteamClient(); SteamUsers[indexElement] = new SteamUser(SteamClients[indexElement]); SteamFriends[indexElement] = new Steam.SteamFriends(SteamClients[indexElement]); SteamClients[indexElement].on("connected", function(){ SteamUsers[indexElement].logOn( { accountName: element["username"], password: element["password"] } ); }); SteamClients[indexElement].on("logOnResponse", function(res){ if (res.eresult == Steam.EResult.OK) { console.log("Successfully logged on as " + element["username"]) //Set state to offline SteamFriends[indexElement].setPersonaState(Steam.EPersonaState.Offline); //Playing CSGO SteamUsers[indexElement].gamesPlayed( { games_played: [{ game_id: 730 }] } ); } else if (res.eresult == Steam.EResult.AccountLogonDenied) { console.log("SteamGuard Error"); } else { console.log("Steam client can't connect to " + element["username"] + "\n"); console.log(res); SteamClients[indexElement].disconnect(); } }); SteamClients[indexElement].on("error", function(err){ console.log("Error! " + element["username"] + "\n"); console.log(err); }); SteamUsers[indexElement].on("error", function(err){ console.log("Error! " + element["username"] + "\n"); console.log(err); }); SteamClients[indexElement].connect(); }
accounts.json example (it works for non-steamguard accts):
{"accounts":[ {"username":"exampleaccount", "password":"password123"}, {"username":"exampleaccount2", "password":"321drowssap"} ]}
-
Hello I am having an issue when using steam-user. I am getting stuck in a loop with steamguard. It seems to work fine for non-steamguard accounts but after entering the steamguard code it will simply send me another email and prompt me for another steamguard code. I have an example script that I created and tried to upload however I just get an error message "You aren't permitted to upload this kind of file"
Hopefully someone has an idea what I'm doing wrong and/or can post an example code.
SteamGuard Loop
in node-steam-user
Posted · Edited by sexydog
So just using steam-user by itself should allow this to work? Originally I was trying to use node-steam directly which is why that case is in there and I thought I did everything right but I was getting this same steamguard loop which is what led me to steam-user. I'm going to try rewriting my code without the extra seishun stuff and see if it works. Thanks for your advice.
EDIT: It works now, thank's dr. mckay. For anybody who comes across this thread on a google search here's the updated code: