Trajko Posted January 26, 2021 Report Posted January 26, 2021 (edited) Hi, I want to make website where I can add my bots from input on site. What is best way to do it? I was thinking something like this: app.post('submit1', (req, res) => { var namePass = req.body; Test.logOn(namePass); Test.on('steamGuard', function(domain, callback) { res.send('User name and password are correct, ask for mobile auth') }); }); Then website will ask for code. And when i enter it, i recive it like this: app.post('submit2', (req, res) => { var namePassGuard = req.body; new SteamBot(namePassGuard); }); And then i can add in SteamBot constructor something like "when loginKey, save it in db"... So that way i will need to enter code only one time... Am I doing it correct? or something like this app.post('submit2', (req, res) => { var namePassGuard = req.body; Test.logOn(namePassGuard); Test.on('steamGuard', function(domain, callback) { res.send('invalid mobile guard'); }); Test.on('loginKey', (key) =>{ something like this: db.save(namePassGuard, key); new SteamBot(db.this.username.and.key); res.send("login succes") }); }); var Test is new SteamUser() Edited January 26, 2021 by Trajko Quote
Dr. McKay Posted January 28, 2021 Report Posted January 28, 2021 That seems like it would work, although you're going to run into issues if you log into an account that isn't using 2FA. Quote
Trajko Posted January 29, 2021 Author Report Posted January 29, 2021 (edited) Thanks for the reply! Can you tell me which "submit2" from my example should I use? Also, can you tell me what is the best way to keep bots logged in so that I don't need to enter 2FA more than one time? Edited January 29, 2021 by Trajko Quote
Dr. McKay Posted January 29, 2021 Report Posted January 29, 2021 Your second submit2 is the one that would work. Please be aware that your event listeners are going to be called every time steamGuard is emitted, so in that example, the steamGuard listener is going to be invoked both in the submit1 and submit2 handlers. Quote
Trajko Posted January 29, 2021 Author Report Posted January 29, 2021 (edited) Thanks for the reply! I will fix that part. I have few more questions... What is the best way to enter 2FA only one time and keep bots logged in? Is this from "submit2" enough? Should I log off from "Test1" before I log in with "Test2"? Should I log off from "Test2" before I log in with the new SteamBot() constructor? Will all bots log off if I change the password on one acc? What is the best way to keep multiple bots active, so that if one acc got logged off, the rest stay logged in? Should I use new SteamBot() constructor or is there a better way? How can I manage proxies if I enter more than 10acc (i read you said that there should be only 10acc per IP address) so that every 10 acc from input on the website gets a new proxy or? I read the entire documentation a few times, this is everything I need to finish. I would really appreciate it if you can help me. Edited January 31, 2021 by Trajko Quote
Trajko Posted January 31, 2021 Author Report Posted January 31, 2021 (edited) I did this for login part const Test1 = new SteamUser(); const Test2 = new SteamUser(); app.post('submit1', (req, res) => { var namePass = req.body; Test1.logOn(namePass); Test1.on('steamGuard', function(domain, callback) { res.send("User name and password are correct, ask for mobile guard") }); Test1.on('loggedOn', (details) => { res.send("you don't have 2FA") }); }); app.post('submit2', (req, res) => { var namePassGuard = req.body; Test2.logOn(namePassGuard); Test2.on('steamGuard', function(domain, callback) { res.send('invalid mobile guard'); }); Test2.on('loginKey', (key) =>{ database.insert(namePassGuard, key); new SteamBot({ accountName: namePassGuard.accountName, rememberPassword: true, loginKey: key }); res.send("login succes") }); }); Will it work? Can you please help me with the questions above? I read every single post and documentation... Edited January 31, 2021 by Trajko Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.