Jump to content
McKay Development

Avolis

Member
  • Posts

    7
  • Joined

  • Last visited

Avolis's Achievements

  1. I login using cookies and try to change profile photo. Sometimes it works but sometimes not. Do you have any idea why it doesn't work sometimes? community.loggedIn((err, log) =>{ if(log == true){ console.log("logged in"); community.uploadAvatar("animage.png", null, (err, url) =>{ if(err){ throw err; } else{ console.log("success"); } }) })
  2. Consider myBoolToNormal is false. a = 0; InitializeProject(); Myfunction(); function Myfunction(){ (community.loggedIn((err, log) =>{ if(log == true){ console.log("logged in"); if (myBoolToNormal) { community.editProfile({ name: names[a] }); community.uploadAvatar("C:/Users/Okan/Desktop/Desktop Authenticators/Enes/Images/"+ a +".jpg") console.log("sucess"); } else{ community.editProfile({ name: names[a] + "something", }, (err) => { if(err){ throw err; } else{ community.uploadAvatar("C:/Users/Okan/Desktop/Desktop Authenticators/Enes/Images/avatarToPut.jpg","jpg", (err, url) =>{ if(err){ throw err; } else{ console.log("success"); a++; InitializeProject(); Myfunction(); } }); } }) } } else{ Myfunction(); console.log("running again"); } })) } async function InitializeProject() { community = new SteamCommunity(); await community.setCookies([cookies[a]]); } When I run the code I get this error. Uncaught Error Error: An error occurred while setting account details<br /> at <anonymous> (c:\Users\Okan\node_modules\steamcommunity\components\profile.js:151:15) at <anonymous> (c:\Users\Okan\node_modules\steamcommunity\components\http.js:67:15) at self.callback (c:\Users\Okan\node_modules\request\request.js:185:22) at emit (events:513:28) at <anonymous> (c:\Users\Okan\node_modules\request\request.js:1154:10) at emit (events:513:28) at <anonymous> (c:\Users\Okan\node_modules\request\request.js:1076:12) at onceWrapper (events:627:28) at emit (events:513:28) at endReadableNT (internal/streams/readable:1359:12) at processTicksAndRejections (internal/process/task_queues:82:21) --- TickObject --- It's a very long error actually I put only the beggining of it. I also get another error sometimes. Uncaught SyntaxError SyntaxError: Unexpected token < in JSON at position 0 at <anonymous> (c:\Users\Okan\node_modules\steamcommunity\components\profile.js:149:21) at <anonymous> (c:\Users\Okan\node_modules\steamcommunity\components\http.js:67:15) at self.callback (c:\Users\Okan\node_modules\request\request.js:185:22) at emit (events:513:28) at <anonymous> (c:\Users\Okan\node_modules\request\request.js:1154:10) at emit (events:513:28) at <anonymous> (c:\Users\Okan\node_modules\request\request.js:1076:12) at onceWrapper (events:627:28) at emit (events:513:28) at endReadableNT (internal/streams/readable:1359:12) at processTicksAndRejections (internal/process/task_queues:82:21) --- TickObject ---
  3. I commented the login part of the code so it's disabled now .After I set the cookies I checked if I am loggedin or not. On console it always logs false. I get the cookies from my webbrowser and they are still valid. What seems the be the issue here? Loggedin callback runs after login function only? Is that the reason it always logs false? But Im sure I am not logged in because I tried to edit the profile name it doesn't work but if I use login method it works. communities[a] setInterval(() => communities[a].loggedIn((err,result) => { console.log(result); }), 500); Edit: I logged of from my browser and logged in again to get new cookies. Now it logs true. But why the previous one wasn't working? It was working on my browser pretty well. I was able to edit my account with the browser. Should I do something to make that cookie last longer or set some other cookies? Edit2: I used steam-session module and getWebCookies function to extract cookies. I did but sometimes it yields steamcountry cookie with loginsecure cookie, but sometime it yields sessionId cookie with loginsecure cookie. Do I need these sessionId and steamcountry cookies? What are the restrictions if I don't set them?
  4. Am I have to login after setting the cookies? I was reading the wiki page about cookies it says that setCookies method used for resuming a previous session. And is loginSecure cookie enough? I created a SteamCommunity array to use one SteamCommunity class for individual accounts, and I set the cookies. var a = 0; communities[a].setCookies(["steamLoginSecure=76561199482800.........", "sessionid=8aecff1a.........."]); communities[a+1].setCookies(["steamLoginSecure=7656119...", "sessionid=906....."]); communities[a+2].setCookies(["steamLoginSecure=7656119948259173.....","sessionid=247e3950...."]); setInterval(() => doLogin(communities[a], usernames[a], passwords[a], steamTotp.generateAuthCode(Secrets[a])), 5000); Inside the dologin function I used login function, and increased 'a' after each account completes it's thing. But still after 2 logins third one throws http 429 error. I couldn't get around this error. Am I doing something wrong with the cookies or am I using wrong methods to logIn or am I not continuing the session?
  5. When I wanted to use setCookies function I get an error. Uncaught TypeError TypeError: cookies.forEach is not a function at SteamCommunity.setCookies (c:\Users\Okan\node_modules\steamcommunity\index.js:297:10) at <anonymous> (c:\Users\Okan\Desktop\Change.js:21:16) at Module._compile (internal/modules/cjs/loader:1254:14) at Module._extensions..js (internal/modules/cjs/loader:1308:10) at Module.load (internal/modules/cjs/loader:1117:32) at Module._load (internal/modules/cjs/loader:958:12) at executeUserEntryPoint (internal/modules/run_main:81:12) at <anonymous> (internal/main/run_main_module:23:47) Did I installed the stemcommunity module wrong? This is the line of code that I set the cookies. I set the cookies before the login attempt. community.setCookies('steamLoginSecure=76561199482.........');
  6. When I run the code session.steamID and account name are always undefined and null. const steamTotp = require('steam-totp'); const {LoginSession, EAuthTokenPlatformType} = require('steam-session'); const { EResult } = require('steam-user'); let session = new LoginSession(EAuthTokenPlatformType.WebBrowser); session.startWithCredentials({ accountName: 'username', password: 'password', steamGuardMachineToken: steamTotp.generateAuthCode('mysecret') }); var refreshInterval = setInterval(() => console.log(session._accountName), 1000); var refreshInterval = setInterval(() => console.log(session.steamID), 1000); But if I change it to steamClient instead of WebBrowser in the output I see. null undefined SteamID {universe: 1, type: 1, instance: 1, accountid: 1522534272} undefined SteamID {universe: 1, type: 1, instance: 1, accountid: 1522534272} undefined SteamID {universe: 1, type: 1, instance: 1, accountid: 1522534272} undefined SteamID {universe: 1, type: 1, instance: 1, accountid: 1522534272} undefined SteamID {universe: 1, type: 1, instance: 1, accountid: 1522534272} undefined SteamID {universe: 1, type: 1, instance: 1, accountid: 1522534272} Why can't I have the account name? I don't get any error so that means I am able to login on both code right? Edit: what the accountid: 1522534272 means? It's not my steam accounts id. Edit2: When I change SteamGuardMachineToken with steamGuardCode I am able to have cookies and username and all. Thanks for the cookies. Now I should save this loginsecure code and use it on the steam-community login part right? I will continue to that session with the cookie. I am so new around here I am telling this for you to correct me if I am wrong. Thanks in advance.
  7. When I try to sign in it's totally fine but if I wanted to sign in to another account after 5 seconds I get this error. I don't understand what causes this. I am just trying to sign in. if I want to sign in using chrome it's totally fine I can sign in with 10 accounts at the same time with different chromes. But why do I get this error when I sign in with code? var a = 0; var refreshInterval = setInterval(() => doLogin(communities[a], usernames[a], passwords[a],steamTotp.generateAuthCode(Secrets[a + 299]).toString()), 500); function doLogin(community, accountName, password, authCode) { community.login({ accountName: accountName, password: password, twoFactorCode: authCode, }, (err, sessionID, cookies, steamguard) => { if (err) { if (err.message == 'SteamGuard') { console.log('This account does not have two-factor authentication enabled.'); process.exit(); return; } if (err.message == 'CAPTCHA') { console.log(err.captchaurl); rl.question('CAPTCHA: ', (captchaInput) => { doLogin(accountName, password, authCode, captchaInput); }); return; } console.log(err); process.exit(); return; } community.profileSettings({ gameDetails:SteamCommunity.PrivacyState.Public }); a++; if(a >= 10){ clearInterval(refreshInterval); } console.log("Privacy settings changed successufly"); }); }
×
×
  • Create New...