-
Notifications
You must be signed in to change notification settings - Fork 909
How do I use SteamBot with the new forced mobile authentication? #847
Comments
you don't |
@Jessecar96 |
Not sure if this is helpful, but WinAuth supports Steam Authentication: https://github.com/winauth/winauth/blob/ea77e9446b7fca86389f8698f260b97015669e3d/Authenticator/SteamAuthenticator.cs |
@waylaidwanderer |
Also, according to what I read from Steam, you can use the same number for multiple Steam accounts. |
Apparently, you have to jump through a lots of hoops to get your account ready to trade instantly:
|
@scholtzm what do you mean with TOTP device? |
@greyz: The second-factor authentication algorithm used by Steam (and many other services): https://en.wikipedia.org/wiki/Time-based_One-time_Password_Algorithm |
In this case SteamBot could be the TOTP device so logging in should work. If I understand this correctly, this will also make the SteamGuard sentry file useless since once you enable the mobile auth, you need to use the TOTP every time you log in. |
I've begun the process of adding winauth's Steam authenticator code to SteamBot. Currently everything compiles perfectly, now I need to figure out what do actually do with it. :P |
It's missing the trade offer confirmation process but other than that, it should be pretty easy to port over. |
Here's what I currently have, if you guys want to fiddle around with it: https://github.com/waylaidwanderer/SteamTradeOffersBot/tree/master You'll still need to add something similar to https://github.com/winauth/winauth/blob/618f11fbefc95a0f62c439545905c941470ae214/WinAuth/AddSteamAuthenticator.cs in the ExampleBot project, I imagine. |
@waylaidwanderer |
@waylaidwanderer Please keep in mind that WinAuth uses the GNU GPL license, while SteamBot is licensed under the MIT license. In order to use any code from the WinAuth project, we'd be legally required to switch to GNU GPL. The main difference for us would be, with GNU GPL, anyone who sells bots to other people would be legally required to provide the source if requested, and to allow those other people to distribute (or even sell) that source for themselves. [Edit] I would actually be okay with this change, lol. But I realize some of you do sell bots, so... |
Fair catch @BlueRaja, we should be mindful to write our own implementation
|
Yeah, but I expect someone could write their own Steam Authenticator class (since winauth did it, it's definitely possible and we can see how it's done) and release it under MIT. Basically what @Bottswana just said. |
I'll explain a little bit more on it, It's not hard to write code to generate the auth codes and run all the web requests to get it setup. A bunch of people have already inspected all the requests to set it up. Once all the web requests are through you get 2 secret keys. "shared_secret" is to generate login keys (use in place of old steam guard keys), and "identity_secret" is used to generate keys to accept trade confirmations. C# implementation of generating login keys: https://github.com/winauth/winauth/blob/master/Authenticator/SteamAuthenticator.cs#L644 decompiled java from the steam app for generating trade confirmation keys: http://pastebin.com/kdYecDUr The only real requirement once the code is done is to have a secure phone number that you can receive SMS through to set it up. Probably something like Google Voice would work there. And of course, if the other user doesn't have mobile auth, handling the trade status when the items are held by steam and figuring out when they're out of hold. |
@Jessecar96 decompiled |
Geel is also working on a C# library for both methods: https://github.com/geel9/SteamAuth |
Sounds good @Jessecar96, and I'm sure both you and @geel9's work will be appreciated by many, including myself. |
@Jessecar96 @geel9 any news so far? |
@GreYzZ The desktop app is only for users that don't have access to a android/ios device. I don't think anyone is working on integrating it into SteamBot yet. |
@Jessecar96 |
Or is that even possible like I meant? @Jessecar96 |
Of course it is possible. @geel9 Made a library, @Jessecar96 made a desktop app for accepting and denying trades and now someone needs to implement those things into SteamBot. |
I would offer to do so but I only know enough C# to write a userhandler...but if there isn't any way I could help someone with the actual coding...what I can do is give them free pizza for helping us all! (I'm serious!) |
I heard the is already a way to implement SteamAuth into the bot. |
Does enabling mobile auth on a Steam account disable you from trading for 7 days? I don't remember if this was the case when I did it on my account. Edit: the answer is no. |
I will have nothing but praise for you bartico/quake even if your code is the ugliest thing I've ever seen. And since you are in Poland I can't buy you any pizza, but I would totally buy you a game on your Steam wishlist in gratitude for your hard work. Just send me a link to your Steam profile. It's not payment, just a 'thank you' that you can have fun with. :) |
Just added code for my SteamTradeOffersBot fork that supports adding mobile auth and logging in with 2FA. Tested it and it works, although it doesn't support accounts that already have 2FA added. It still needs some improvements (e.g. make it work with the bot manager console), but you guys can use this to see how to implement @geel9's SteamAuth library. Appreciate the work you put into it, @geel9. |
Thanks for your work, waylaidwanderer/Joel. I'm looking forward to trying it out. Do you want some more pizza? I'm the guy who sent you some before because I based my userhandler off of KeyUserHandler and learned a lot from updating it. I'm making this thread too long so just send me an email, reddit message, or something! @waylaidwanderer 's comment below: OK! Offer stands if you get hungry... :) |
I just updated my project with to support trade confirmations with mobile auth as well (using @geel9's SteamAuth), here is the relevant commit, if you guys want to have a look: waylaidwanderer@f2150e7 @ThereWasADream thank you, but I'll have to decline. It was already more than enough you did it once :) |
👍 @ThereWasADream I just looked up your KeyUserHandler repository, and I can tell you that it is very useful. @waylaidwanderer Might want to make a PR? |
Thanks for the work @waylaidwanderer but did you know that your build is failing to build? (atleast for me) https://ci.appveyor.com/project/waylaidwanderer/steamtradeoffersbot/branch/master |
My 2FA-related code is an absolute abomination (written up quick, starring (while(notready) Thread.sleep(250)) as a method of awaiting input from the bot manager console) but it should work. I will test it out today and if it works, I'll post it on reddit and send you the link here, as it's not qualifying for a PR. |
@BestPotatoEU You're looking at the wrong branch. https://ci.appveyor.com/project/waylaidwanderer/steamtradeoffersbot. To be fair, this one is also failing to build, but that's because SteamAuth is a submodule which you have to fetch first. @AleksaSavic3 It's not ready for a pull request. Someone could probably write it better. I might give it a go myself. |
It would appear that if Steambot users are not implementing this today, escrow will go into effect for at least a day. "Starting Dec 9, anyone losing items in a trade will need to have a Steam Guard Mobile Authenticator enabled on their account for at least 7 days." So basically, today is the deadline to use this without interruption. I for one will be trying out waylaid's code (modified to work with vanilla Steambot) and I would be willing to comment on it once I've done so...assuming I figure out how to do it. I think I can, I know enough C# for THAT much! :P |
I just pushed another commit:
You can also type You are free to use this source code for yourself, or if someone wants to use this as a reference to make a pull request to SteamBot. |
Hey waylaid, I have an issue and I'm not sure what's causing it. I am trying to exec the "linkauth" custom command but it insists I enter a new SteamGuard code even though I'm already logged in and authenticated. I tried entering the new code from my email anyway just to what would happen. Nothing. Any ideas? |
@ThereWasADream if you're using my fork, open an issue there and we'll discuss it. First though, make sure you're doing something like "exec 0 linkauth" then "input 0 XXXXX". |
I am, and your latest commit fixed the issue so that won't be necessary. To all: I highly recommend waylaid's method for 2FA!!! |
To those who want to use it in SteamBot, check out this pull request: #853 |
There's already PR #853. |
Awesome |
I've implemented your code and I wanted to login through the webpage after I used 2FA on the bot Yes, the bot is completely in 2FA |
I don't see why it shouldn't be working. If Try implementing something in your userhandler's
@justinchau92 See my comment here first before you attempt the above: #855 (comment) |
This should be closed now. |
Is possible to write this using PHP? |
@MarlonColhado Yes, its only bunch of http requests, you can write it in any language. |
I just would like to convert the shared_secret and time in the mobile authenticator code. Using PHP.. I tried, but many functions do not seem to exist in PHP, lack of byte, and others .. I have a great difficulty that. :/ |
I tried this:
But, unsuccessfully. :/ |
How can you handle to login with the mobile auth?
The escrow system is coming Dec. 9.
http://store.steampowered.com/mobile
The text was updated successfully, but these errors were encountered: