Code Monkey home page Code Monkey logo

steamguard-cli's Introduction

steamguard-cli

Lint, Build, Test AUR Tester

A command line utility for setting up and using Steam Mobile Authenticator (AKA Steam 2FA). It can also be used to respond to trade, market, and any other steam mobile confirmations that you would normally get in the app.

The only legitimate place to download steamguard-cli binaries is through this repo's releases, or by any package manager that is linked in this document.

Disclaimer

This utility is effectively in beta. Use this software at your own risk. Make sure to back up your maFiles regularly, and make sure to actually write down your revocation code. If you lose both of these, we can't help you, your only recourse is to beg Steam support.

Quickstart

If you have no idea what the rest of this document is talking about, go read the quickstart.

Features

  • Generate 2FA codes
  • Respond to trade, market or any other confirmations
  • Encrypted storage of your 2FA secrets
    • With the option to store your encryption passkey in the system keyring
  • Special memory-clearing data structures to prevent leaking secrets
  • QR code generation for importing 2FA secrets into other applications, like KeeWeb
  • QR code logins for quickly logging into Steam on a new device, like the Steam Deck
  • Able to read Steam Desktop Authenticator's maFiles format
  • Uses as many official Steam APIs as possible, unlikely to break

Install

If you have the Rust toolchain installed:

cargo install steamguard-cli

Arch-based systems can install from the AUR:

Otherwise, you can download binaries from the releases.

Building From Source

cargo build --release

Usage

steamguard-cli looks for your maFiles/manifest.json in at these paths, in this order:

Linux:

  • ~/.config/steamguard-cli/maFiles/
  • ~/maFiles/

Windows:

  • %APPDATA%\Roaming\steamguard-cli\maFiles\
  • %USERPROFILE%\maFiles\

Your maFiles can be created with or imported from Steam Desktop Authenticator. You can create maFiles with steamguard-cli using the setup action (steamguard setup).

REMEMBER TO MAKE BACKUPS OF YOUR maFiles, AND TO WRITE DOWN YOUR RECOVERY CODE!

Full helptext can be displayed with:

steamguard --help

One Liners

Generate and copy a new code to clipboard:

steamguard | xclip -selection clipboard

Importing 2FA Secret Into Other Applications

It's possible to import your 2FA secret into other applications. This is useful if you want to use a password manager to generate your 2FA codes, like KeeWeb.

To make this easy, steamguard-cli can generate a QR code for your 2FA secret. You can then scan this QR code with your password manager.

steamguard qr # print QR code for the first account in your maFiles
steamguard -u <account name> qr # print QR code for a specific account

There are some applications that do not generate correct 2fa codes from the secret, so do not use them:

  • Google Authenticator
  • Authy

Contributing

By contributing code to this project, you give me and any future maintainers a non-exclusive transferable license to use that code for this project, including permission to modify, redistribute, and relicense it.

License

steamguard-cli, the command line program is licensed under GPLv3.

steamguard, the library that is used by steamguard-cli is dual licensed under MIT or Apache 2.0, at your option.

Used By

steamguard-cli's People

Contributors

alexmi1 avatar cybershadow avatar cyrant avatar dependabot[bot] avatar dyc3 avatar gergesh avatar h44z avatar kasp1 avatar mads256h avatar marvinlehmann avatar salahmak avatar sueskind avatar tilosp avatar yangtsesu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

steamguard-cli's Issues

The captcha verification doesn't seem to work

When I open the captcha url in a browser and input the code into steamguard-cli's add subcommand, it doesn't seem to accept it and just puts me in an endless loop.

edit: ignore the original issue title, I didn't look hard enough at the page.

How to use winauth's backup file on steamguard-cli

Hello, before switching to linux I had winauth, and i've exported the recovery file from there (not encrypted), it has output like this:
optauth:<some long string for the steam guard info>

So now, on linux, I can't use winauth, so i had to use steamguard-cli, but i have no idea how to use the old winauth export file in this tool, i've tried putting it on the ~/maFiles folder, but still didn't work. Would be so happy if there is a way to transfer steam auth from winauth to steamguard without going through the process of recovering my steam account, bcs i can't even access it at this point.
Thanks

Specific username fails in setup

Sorry if this is more of a support thread but I seem to have come across a strange issue.

With the latest version of the program, attempting to run setup with an account with the username "2end_life" fails during the login step, after entering the password, (the correct one) the program always returns "GeneralFailure". This was tested on two different pcs, one running Ubuntu 16.04, the other with 17.04.

If I use an account with a different name it makes it through the setup just fine.

Missing file problem

error CS0009: Metadata file /root/steamguard-cli/./SteamAuth/SteamAuth/packages /Newtonsoft.Json.12.0.3/lib/net45/Newtonsoft.Json.dll' does not contain valid me tadata Compilation failed: 1 error(s), 0 warnings error CS0006: Metadata file build/SteamAuth.dll' could not be found
error CS0009: Metadata file `/root/steamguard-cli/build/Newtonsoft.Json.dll' doe s not contain valid metadata
Compilation failed: 2 error(s), 0 warnings

ReadLineSecure causes ArgumentOutOfRangeException in setup

The specific username "2end_life" causes the program to crash when it is entered in the setup option of the program.
Entering a username consisting of just letters does not cause this

Out put of program when this happens:
Username: 2end_life Password: Unhandled Exception: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: startIndex at System.String.Insert (System.Int32 startIndex, System.String value) [0x00024] in <8f2c484307284b51944a1a13a14c0266>:0 at SteamGuard.Utils.ReadLineSecure () [0x00042] in <fa10f4392ed44c4d8c66aa838b95da45>:0 at SteamGuard.Program.Setup (System.String username, System.String passkey) [0x00045] in <fa10f4392ed44c4d8c66aa838b95da45>:0 at SteamGuard.Program.Main (System.String[] args) [0x003d8] in <fa10f4392ed44c4d8c66aa838b95da45>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: startIndex at System.String.Insert (System.Int32 startIndex, System.String value) [0x00024] in <8f2c484307284b51944a1a13a14c0266>:0 at SteamGuard.Utils.ReadLineSecure () [0x00042] in <fa10f4392ed44c4d8c66aa838b95da45>:0 at SteamGuard.Program.Setup (System.String username, System.String passkey) [0x00045] in <fa10f4392ed44c4d8c66aa838b95da45>:0 at SteamGuard.Program.Main (System.String[] args) [0x003d8] in <fa10f4392ed44c4d8c66aa838b95da45>:0

ArgumentOutOfRangeException when viewing trades

Version: v0.2.2.0

% ./steamguard trade
Retrieving trade confirmations...

Unhandled Exception:
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: i
  at System.Text.RegularExpressions.MatchCollection.get_Item (System.Int32 i) [0x00015] in <2fef7234205a4a009fe5995569c314ee>:0 
  at SteamAuth.SteamGuardAccount.FetchConfirmations () [0x0010a] in <6a95291e97294c488544cad5c1101962>:0 
  at SteamGuard.Program.processConfirmations (SteamAuth.SteamGuardAccount account) [0x00182] in <f67e175915d940a0985109e2a0400890>:0 
  at SteamGuard.Program.Trade (System.String user) [0x000c3] in <f67e175915d940a0985109e2a0400890>:0 
  at SteamGuard.Program.Main (System.String[] args) [0x0038a] in <f67e175915d940a0985109e2a0400890>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: i
  at System.Text.RegularExpressions.MatchCollection.get_Item (System.Int32 i) [0x00015] in <2fef7234205a4a009fe5995569c314ee>:0 
  at SteamAuth.SteamGuardAccount.FetchConfirmations () [0x0010a] in <6a95291e97294c488544cad5c1101962>:0 
  at SteamGuard.Program.processConfirmations (SteamAuth.SteamGuardAccount account) [0x00182] in <f67e175915d940a0985109e2a0400890>:0 
  at SteamGuard.Program.Trade (System.String user) [0x000c3] in <f67e175915d940a0985109e2a0400890>:0 
  at SteamGuard.Program.Main (System.String[] args) [0x0038a] in <f67e175915d940a0985109e2a0400890>:0 

ArgumentOutOfRangeException when viewing trades

I get the following error:

System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: i at System.Text.RegularExpressions.MatchCollection.get_Item (System.Int32 i) [0x00015] in <2fef7234205a4a009fe5995569c314ee>:0 at SteamAuth.SteamGuardAccount.FetchConfirmations () [0x0010a] in <e9380748a38f4f39b77c7f4ae9afdc4b>:0 at SteamGuard.Program.processConfirmations (SteamAuth.SteamGuardAccount account) [0x00182] in <8105e53619334720bc024ca58d8d1f87>:0 at SteamGuard.Program.Trade (System.String user, System.String passkey) [0x000cf] in <8105e53619334720bc024ca58d8d1f87>:0 at SteamGuard.Program.Main (System.String[] args) [0x003e4] in <8105e53619334720bc024ca58d8d1f87>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: i at System.Text.RegularExpressions.MatchCollection.get_Item (System.Int32 i) [0x00015] in <2fef7234205a4a009fe5995569c314ee>:0 at SteamAuth.SteamGuardAccount.FetchConfirmations () [0x0010a] in <e9380748a38f4f39b77c7f4ae9afdc4b>:0 at SteamGuard.Program.processConfirmations (SteamAuth.SteamGuardAccount account) [0x00182] in <8105e53619334720bc024ca58d8d1f87>:0 at SteamGuard.Program.Trade (System.String user, System.String passkey) [0x000cf] in <8105e53619334720bc024ca58d8d1f87>:0 at SteamGuard.Program.Main (System.String[] args) [0x003e4] in <8105e53619334720bc024ca58d8d1f87>:0

Can't install

I'm using Ubuntu 20.04. When I try to make this one, I have it:
How to fix?

mkdir -p build/
nuget restore SteamAuth/SteamAuth/SteamAuth.sln
MSBuild auto-detection: using msbuild version '15.0' from '/usr/lib/mono/msbuild/15.0/bin'.
All packages listed in packages.config are already installed.
echo "NEWTONSOFT_JSON_PATH=./SteamAuth/SteamAuth/packages/Newtonsoft.Json.12.0.3/lib/net45/Newtonsoft.Json.dll"
NEWTONSOFT_JSON_PATH=./SteamAuth/SteamAuth/packages/Newtonsoft.Json.12.0.3/lib/net45/Newtonsoft.Json.dll
mcs -target:library -out:build/SteamAuth.dll -r:./SteamAuth/SteamAuth/packages/Newtonsoft.Json.12.0.3/lib/net45/Newtonsoft.Json.dll SteamAuth/SteamAuth/APIEndpoints.cs SteamAuth/SteamAuth/AuthenticatorLinker.cs SteamAuth/SteamAuth/Confirmation.cs SteamAuth/SteamAuth/SessionData.cs SteamAuth/SteamAuth/SteamGuardAccount.cs SteamAuth/SteamAuth/SteamWeb.cs SteamAuth/SteamAuth/TimeAligner.cs SteamAuth/SteamAuth/UserLogin.cs SteamAuth/SteamAuth/Util.cs SteamAuth/SteamAuth/Properties/AssemblyInfo.cs
SteamAuth/SteamAuth/SteamGuardAccount.cs(330,20): warning CS0219: The variable `referer' is assigned but its value is never used
SteamAuth/SteamAuth/SteamGuardAccount.cs(350,20): warning CS0219: The variable `referer' is assigned but its value is never used
SteamAuth/SteamAuth/SteamGuardAccount.cs(371,20): warning CS0219: The variable `referer' is assigned but its value is never used
SteamAuth/SteamAuth/UserLogin.cs(75,38): warning CS0219: The variable `secureRandom' is assigned but its value is never used
Compilation succeeded - 4 warning(s)
cp ./SteamAuth/SteamAuth/packages/Newtonsoft.Json.12.0.3/lib/net45/Newtonsoft.Json.dll build/
mcs -out:build/steamguard -r:build/SteamAuth.dll -r:build/Newtonsoft.Json.dll -r:/usr/lib/mono/4.5/System.Security.dll Program.cs Manifest.cs AssemblyInfo.cs Utils.cs

Can't view trade confirmation to accept them anymore

Currently using the most recent version, 0.3.4.1.0

Unhandled Exception:
System.AggregateException: One or more errors occurred. ---> System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: i
  at System.Text.RegularExpressions.MatchCollection.get_Item (System.Int32 i) [0x00015] in <50d80b08c1a5449282b22aedf03ce925>:0 
  at SteamAuth.SteamGuardAccount+<FetchConfirmationsAsync>c__async0.MoveNext () [0x001c3] in <e9380748a38f4f39b77c7f4ae9afdc4b>:0 
   --- End of inner exception stack trace ---
  at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00011] in <62f5937022004555807e6c57c33f6684>:0 
  at System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00043] in <62f5937022004555807e6c57c33f6684>:0 
  at System.Threading.Tasks.Task.Wait () [0x00000] in <62f5937022004555807e6c57c33f6684>:0 
  at SteamGuard.Program.processConfirmations (SteamAuth.SteamGuardAccount account) [0x0007c] in <3cb839bf24f747bca86bd11fed201ffe>:0 
  at SteamGuard.Program.Trade (System.String user, System.String passkey) [0x000c5] in <3cb839bf24f747bca86bd11fed201ffe>:0 
  at SteamGuard.Program.Main (System.String[] args) [0x00430] in <3cb839bf24f747bca86bd11fed201ffe>:0 
---> (Inner Exception #0) System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: i
  at System.Text.RegularExpressions.MatchCollection.get_Item (System.Int32 i) [0x00015] in <50d80b08c1a5449282b22aedf03ce925>:0 
  at SteamAuth.SteamGuardAccount+<FetchConfirmationsAsync>c__async0.MoveNext () [0x001c3] in <e9380748a38f4f39b77c7f4ae9afdc4b>:0 <---

[ERROR] FATAL UNHANDLED EXCEPTION: System.AggregateException: One or more errors occurred. ---> System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: i
  at System.Text.RegularExpressions.MatchCollection.get_Item (System.Int32 i) [0x00015] in <50d80b08c1a5449282b22aedf03ce925>:0 
  at SteamAuth.SteamGuardAccount+<FetchConfirmationsAsync>c__async0.MoveNext () [0x001c3] in <e9380748a38f4f39b77c7f4ae9afdc4b>:0 
   --- End of inner exception stack trace ---
  at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00011] in <62f5937022004555807e6c57c33f6684>:0 
  at System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00043] in <62f5937022004555807e6c57c33f6684>:0 
  at System.Threading.Tasks.Task.Wait () [0x00000] in <62f5937022004555807e6c57c33f6684>:0 
  at SteamGuard.Program.processConfirmations (SteamAuth.SteamGuardAccount account) [0x0007c] in <3cb839bf24f747bca86bd11fed201ffe>:0 
  at SteamGuard.Program.Trade (System.String user, System.String passkey) [0x000c5] in <3cb839bf24f747bca86bd11fed201ffe>:0 
  at SteamGuard.Program.Main (System.String[] args) [0x00430] in <3cb839bf24f747bca86bd11fed201ffe>:0 
---> (Inner Exception #0) System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: i
  at System.Text.RegularExpressions.MatchCollection.get_Item (System.Int32 i) [0x00015] in <50d80b08c1a5449282b22aedf03ce925>:0 
  at SteamAuth.SteamGuardAccount+<FetchConfirmationsAsync>c__async0.MoveNext () [0x001c3] in <e9380748a38f4f39b77c7f4ae9afdc4b>:0 <---

Only happened recently, i could view my trades no problem like a week or so ago. Not sure what the problem is.

I'm using linux mint.

Also, everytime i use the accept_all command, it says No Steam accounts found in SteamAuth.SteamGuardAccount , which it might be the reason why. Not sure what else to add my steam account to besides the mafiles that is already present in its specific folder

Compile error

nuget 2.14-2
mono 5.10.0.179-1
$ git clone --recursive https://github.com/dyc3/steamguard-cli.git
$ cd steamguard-cli
$ LANG=C make
mkdir -p build/
nuget restore SteamAuth/SteamAuth/SteamAuth.sln

Unhandled Exception:
System.TypeInitializationException: The type initializer for 'System.Console' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.ConsoleDriver' threw an exception. ---> System.Exception: Magic number is wrong: 542
at System.TermInfoReader.ReadHeader (System.Byte[] buffer, System.Int32& position) [0x00028] in <2dfe84a36ef4410ca18642993b51b799>:0
at System.TermInfoReader..ctor (System.String term, System.String filename) [0x0005f] in <2dfe84a36ef4410ca18642993b51b799>:0
at System.TermInfoDriver..ctor (System.String term) [0x00055] in <2dfe84a36ef4410ca18642993b51b799>:0
at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in <2dfe84a36ef4410ca18642993b51b799>:0
at System.ConsoleDriver..cctor () [0x0004d] in <2dfe84a36ef4410ca18642993b51b799>:0
--- End of inner exception stack trace ---
at System.Console.SetupStreams (System.Text.Encoding inputEncoding, System.Text.Encoding outputEncoding) [0x00007] in <2dfe84a36ef4410ca18642993b51b799>:0
at System.Console..cctor () [0x0008e] in <2dfe84a36ef4410ca18642993b51b799>:0
--- End of inner exception stack trace ---
at NuGet.Program.Main (System.String[] args) [0x00005] in :0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'System.Console' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.ConsoleDriver' threw an exception. ---> System.Exception: Magic number is wrong: 542
at System.TermInfoReader.ReadHeader (System.Byte[] buffer, System.Int32& position) [0x00028] in <2dfe84a36ef4410ca18642993b51b799>:0
at System.TermInfoReader..ctor (System.String term, System.String filename) [0x0005f] in <2dfe84a36ef4410ca18642993b51b799>:0
at System.TermInfoDriver..ctor (System.String term) [0x00055] in <2dfe84a36ef4410ca18642993b51b799>:0
at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in <2dfe84a36ef4410ca18642993b51b799>:0
at System.ConsoleDriver..cctor () [0x0004d] in <2dfe84a36ef4410ca18642993b51b799>:0
--- End of inner exception stack trace ---
at System.Console.SetupStreams (System.Text.Encoding inputEncoding, System.Text.Encoding outputEncoding) [0x00007] in <2dfe84a36ef4410ca18642993b51b799>:0
at System.Console..cctor () [0x0008e] in <2dfe84a36ef4410ca18642993b51b799>:0
--- End of inner exception stack trace ---
at NuGet.Program.Main (System.String[] args) [0x00005] in :0
make: *** [makefile:3: all] Error 1

Application not opening on Manjaro (Arch) Linux

I did all the steps correctly and had problems running the application with both available commands:

bash: build/steamguard: cannot execute binary file: Exec format error

make run
build/steamguard -v
build/steamguard: build/steamguard: cannot execute binary file
make: *** [makefile:9: run] Error 126

'deny' accepts confirmations

i just did a test trade with this to a friend, opened steamguard trade, set 'deny' on the listing there, and pressed enter. it processed. i checked my trade history, and Steam showed the listing as accepted. the friend agreed it went through.

error: No accounts read. On arch linux

This error showed up after a previous error about not being able to get access to somewhere, so i ran build/steamguard using sudo, and this error appears even if I run it normally.

0024:err:module:open_builtin_file failed to load .so lib "/usr/lib32/wine/l3codeca.acm.so"
0024:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
00c8:fixme:nls:GetFileMUIPath stub: 0x10, L"C:\\windows\\system32\\tzres.dll", (null), 0B9FE338, 0BF03080, 0B9FE33C, 0B9FE330
00c8:fixme:nls:GetFileMUIPath stub: 0x10, L"C:\\windows\\system32\\tzres.dll", (null), 0B9FE338, 0BF03080, 0B9FE33C, 0B9FE330
error: No accounts read.

[enhancement] macOS support

So, I tried to build this on macOS and got pretty far, but then ran into some issues, which I thought I would post here.

To setup my macos environment, I used homebrew and ran:

brew install nuget

which installed mono-6.8.0.96, and v5.4.0/nuget.exe

I then needed to edit one line in the makefile so that it read like this (pointing to /usr/local/lib):

mcs -out:build/steamguard -r:build/SteamAuth.dll -r:build/Newtonsoft.Json.dll -r:/usr/local/lib/mono/4.5/System.Security.dll Program.cs Manifest.cs AssemblyInfo.cs Utils.cs

At that point make works.

...
SteamAuth/SteamAuth/SteamGuardAccount.cs(326,20): warning CS0219: The variable `referer' is assigned but its value is never used
SteamAuth/SteamAuth/SteamGuardAccount.cs(346,20): warning CS0219: The variable `referer' is assigned but its value is never used
SteamAuth/SteamAuth/SteamGuardAccount.cs(367,20): warning CS0219: The variable `referer' is assigned but its value is never used
SteamAuth/SteamAuth/UserLogin.cs(71,38): warning CS0219: The variable `secureRandom' is assigned but its value is never used
Compilation succeeded - 4 warning(s)
cp SteamAuth/SteamAuth/packages/Newtonsoft.Json.11.0.1/lib/net45/Newtonsoft.Json.dll build/
mcs -out:build/steamguard -r:build/SteamAuth.dll -r:build/Newtonsoft.Json.dll -r:/usr/local/lib/mono/4.5/System.Security.dll Program.cs Manifest.cs AssemblyInfo.cs Utils.cs

However the next build step does not work.

I have never used mono before, so I still need to do some exploration, but I suspect, it is either building for the wrong platform completely or this is a 32 bit application and needs to be build as a 64 bit application on macOS Catalina.

$ file build/steamguard
build/steamguard: PE32 executable (console) Intel 80386 Mono/.Net assembly, for MS Windows

So, it looks like this wouldn't be that hard to get working. I'd be happy to help out with some testing if you can provide some pointers on what to look for or try.

Using the trade action on any specific account other than the first one doesn't work

When using the trade action on any specific account which isn't the first one in SteamGuardAccounts the program exits early without processing its confirmations. The issue is in this foreach loop

steamguard-cli/Program.cs

Lines 539 to 546 in 042b2ac

foreach (var account in SteamGuardAccounts)
{
if (user != "")
if (!string.Equals(account.AccountName, user, StringComparison.CurrentCultureIgnoreCase))
break;
processConfirmations(account);
}

This means that it's only possible to specifically use the trade action on the first loaded account or iterate through all of them.
I'll submit a PR with a fix soon.

Missing file specifications

bash-4.3$ make
mkdir -p build/
nuget restore SteamAuth/SteamAuth/SteamAuth.sln
MSBuild auto-detection: using msbuild version '14.0' from '/usr/lib/mono/xbuild/14.0/bin'.
Restoring NuGet package Newtonsoft.Json.12.0.3.
Adding package 'Newtonsoft.Json.12.0.3' to folder '/home/vita/Desktop/Steam-authenticator/steamguard-cli/SteamAuth/SteamAuth/packages'
Added package 'Newtonsoft.Json.12.0.3' to folder '/home/vita/Desktop/Steam-authenticator/steamguard-cli/SteamAuth/SteamAuth/packages'

NuGet Config files used:
/home/vita/.config/NuGet/NuGet.Config

Feeds used:
/home/vita/.nuget/packages/
https://api.nuget.org/v3/index.json

Installed:
1 package(s) to packages.config projects
echo "NEWTONSOFT_JSON_PATH="
NEWTONSOFT_JSON_PATH=
mcs -target:library -out:build/SteamAuth.dll -r: SteamAuth/SteamAuth/APIEndpoints.cs SteamAuth/SteamAuth/AuthenticatorLinker.cs SteamAuth/SteamAuth/Confirmation.cs SteamAuth/SteamAuth/SessionData.cs SteamAuth/SteamAuth/SteamGuardAccount.cs SteamAuth/SteamAuth/SteamWeb.cs SteamAuth/SteamAuth/TimeAligner.cs SteamAuth/SteamAuth/UserLogin.cs SteamAuth/SteamAuth/Util.cs SteamAuth/SteamAuth/Properties/AssemblyInfo.cs
error CS2005: Missing file specification for `/r:' option
makefile:4: fallo en las instrucciones para el objetivo 'all'
make: *** [all] Error 1

Unable to install due to Nuget version

i'm always getting this whenever i try to install it
with the command "make"
The 'Newtonsoft.Json 11.0.1' package requires NuGet client version '2.12' or above, but the current NuGet version is '2.8.7.0'.

Unable to run on Mac- "Cannot execute binary file"

After going through the full installation process, and make building successfully, I attempted to run steamguard. This is the message I received:

build/steamguard -v
build/steamguard: build/steamguard: cannot execute binary file
make: *** [run] Error 126

How do I fix this? Thanks!

EDIT: I'm on a Mac, if that helps

Exec format error

$ build/steamguard setup
bash: build/steamguard: cannot execute binary file: Exec format error

After build and runing, i got this error.
Using Ubuntu 14.04 64 bits.
Of course I have mono-complete, nuget and make installed.

How can I fix it?

Error fetching SteamAuth submodule

I can't compile because SteamAuth isn't properly fetched starting from 2c429b4. Here's the output

$ git clone --recursive https://github.com/dyc3/steamguard-cli.git
Cloning into 'steamguard-cli'...
remote: Counting objects: 420, done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 420 (delta 12), reused 24 (delta 12), pack-reused 394
Receiving objects: 100% (420/420), 91.38 KiB | 454.00 KiB/s, done.
Resolving deltas: 100% (250/250), done.
Submodule 'SteamAuth' (https://github.com/geel9/SteamAuth.git) registered for path 'SteamAuth'
Cloning into '/data/comp/testing/steamguard-cli/SteamAuth'...
remote: Counting objects: 301, done.        
remote: Compressing objects: 100% (6/6), done.        
remote: Total 301 (delta 0), reused 1 (delta 0), pack-reused 295        
Receiving objects: 100% (301/301), 74.93 KiB | 202.00 KiB/s, done.
Resolving deltas: 100% (186/186), done.
error: Server does not allow request for unadvertised object 2f9f8b92cd365414196b90cae3ab25ff430a4fab
Fetched in submodule path 'SteamAuth', but it did not contain 2f9f8b92cd365414196b90cae3ab25ff430a4fab. Direct fetching of that commit failed.
$ cd steamguard-cli/
$ make
mkdir -p build/
nuget restore SteamAuth/SteamAuth/SteamAuth.sln
Cannot locate a solution file.
make: *** [makefile:3: all] Error 1

Looks like it wasn't properly updated for some reason 2c429b4#diff-022a73d7b6bb11c009f4a20323c8fb79

Issue with command

when i want to do an action like steamguard code name
i get prompted to "steamguard: command not found"

Make Error | Please help a newbie | msbuild

My system: Arch
I followed:

git clone --recursive https://github.com/dyc3/steamguard-cli.git
cd steamguard-cli
make

But at the end I get an error:

>>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<

MSBUILD: error MSBUILD0004: Too many project files specified

WARNING. Error reading msbuild project information, ensure that your input solution or project file is valid. NETCore and UAP projects will be skipped, only packages.config files will be restored.
Restoring NuGet package Newtonsoft.Json.12.0.3.
Adding package 'Newtonsoft.Json.12.0.3' to folder '/home/standart/steamguard-cli/SteamAuth/SteamAuth/packages'
Added package 'Newtonsoft.Json.12.0.3' to folder '/home/standart/steamguard-cli/SteamAuth/SteamAuth/packages'

NuGet Config files used:
    /home/standart/.config/NuGet/NuGet.Config

Feeds used:
    /home/standart/.nuget/packages/
    https://api.nuget.org/v3/index.json

Installed:
    1 package(s) to packages.config projects
echo "NEWTONSOFT_JSON_PATH="
NEWTONSOFT_JSON_PATH=
mcs -target:library -out:build/SteamAuth.dll -r: SteamAuth/SteamAuth/APIEndpoints.cs SteamAuth/SteamAuth/AuthenticatorLinker.cs SteamAuth/SteamAuth/Confirmation.cs SteamAuth/SteamAuth/SessionData.cs SteamAuth/SteamAuth/SteamGuardAccount.cs SteamAuth/SteamAuth/SteamWeb.cs SteamAuth/SteamAuth/TimeAligner.cs SteamAuth/SteamAuth/UserLogin.cs SteamAuth/SteamAuth/Util.cs SteamAuth/SteamAuth/Properties/AssemblyInfo.cs
error CS2005: Missing file specification for `/r:' option
make: *** [makefile:8: all] Error 1

I realized that the msbuild dependency is needed.
Where do I get it, and how do I install it?
I searched all over the internet for it... And I'm already exhausted.

/etc/bash_completion.d may not exist on macos

hey there sir.
this is a great project you got going.
anyway, I'm tryna get this to work on mac and need some help after the building it.

running mono build/steamguard gives me error: No accounts read.

running the one after that is has the same outcome.

running make -f makefile.macos install gives me error
cp: /etc/bash_completion.d/steamguard: No such file or directory make: *** [install] Error 1

in the installation section, i don't even know what to do. i don't think I'm supposed to do the debian package part and the sudo make install gives me the same error as before.

I'm not that experienced with this kinda stuff so any help would be appreciated.

Parsing arguments [suggestion]

Have you considered Mono.Options for parsing CLI args in C#?

It's been a while since I've done something like this, and I don't know what competitors are around, but it was easy and intuitive to use when I needed it.

Here is an STO link showing an example usage of Mono.Options

Unhandled exception after issuing passkey with special characters in prompt

In case I try to enter my passkey when steamguard-cli prompts for it, I am getting the following crash.
https://gist.github.com/loathingKernel/46a5ed026f318910c5c7347868523036

Unlike that case, when issuing the passkey as an argument to steamguard-cli, I am getting the crash only when the passkey is not escaped with quotes. It might not be limited to those, but in my case, my passkey contains the lesser-than and greater-than characters.

Solving the msbuild error when building on Arch.

It took me a long time to satisfy the msbuild dependency. But recently it was solved purely by accident when I first installed "notedape+" in PLayOnLinux and after some time tried to build steamguard-cli again.
If you still can't install all the dependencies to steamguard-cli by yourself, try to load notepade+ in PlayOnLinux.
Since there are problems with mono on arch.

Build error on MacOS

I'm trying to install on MacOS El Capitan but I can't get past the build step. I have installed the latest mono, nuget, and cmake with Homebrew.

$ mono --version
Mono JIT compiler version 5.18.0.225 (tarball Tue Jan  8 19:38:08 PST 2019)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:
	SIGSEGV:       altstack
	Notification:  kqueue
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug
	Interpreter:   yes
	LLVM:          supported, not enabled.
	Suspend:       preemptive
	GC:            sgen (concurrent by default)

$ nuget
NuGet Version: 4.7.0.5148

$ cmake --version
cmake version 3.13.2

However when I try to build I get error CS0006: Metadata file '/usr/lib/mono/4.5/System.Security.dll' could not be found

Here's the full output:

$ git clone --recursive https://github.com/dyc3/steamguard-cli.git
$ cd steamguard-cli/
$ make
mkdir -p build/
nuget restore SteamAuth/SteamAuth/SteamAuth.sln
MSBuild auto-detection: using msbuild version '15.0' from '/usr/local/Cellar/mono/5.18.0.225/lib/mono/msbuild/15.0/bin'.
Restoring NuGet package Newtonsoft.Json.11.0.1.
Adding package 'Newtonsoft.Json.11.0.1' to folder '/Users/templeman/Code/resources/steamguard-cli/SteamAuth/SteamAuth/packages'
Added package 'Newtonsoft.Json.11.0.1' to folder '/Users/templeman/Code/resources/steamguard-cli/SteamAuth/SteamAuth/packages'

NuGet Config files used:
    /Users/templeman/.config/NuGet/NuGet.Config

Feeds used:
    /Users/templeman/.nuget/packages/
    https://api.nuget.org/v3/index.json

Installed:
    1 package(s) to packages.config projects
mcs -target:library -out:build/SteamAuth.dll -r:SteamAuth/SteamAuth/packages/Newtonsoft.Json.11.0.1/lib/net45/Newtonsoft.Json.dll SteamAuth/SteamAuth/APIEndpoints.cs SteamAuth/SteamAuth/AuthenticatorLinker.cs SteamAuth/SteamAuth/Confirmation.cs SteamAuth/SteamAuth/SessionData.cs SteamAuth/SteamAuth/SteamGuardAccount.cs SteamAuth/SteamAuth/SteamWeb.cs SteamAuth/SteamAuth/TimeAligner.cs SteamAuth/SteamAuth/UserLogin.cs SteamAuth/SteamAuth/Util.cs SteamAuth/SteamAuth/Properties/AssemblyInfo.cs
SteamAuth/SteamAuth/SteamGuardAccount.cs(326,20): warning CS0219: The variable `referer' is assigned but its value is never used
SteamAuth/SteamAuth/SteamGuardAccount.cs(346,20): warning CS0219: The variable `referer' is assigned but its value is never used
SteamAuth/SteamAuth/SteamGuardAccount.cs(367,20): warning CS0219: The variable `referer' is assigned but its value is never used
SteamAuth/SteamAuth/UserLogin.cs(71,38): warning CS0219: The variable `secureRandom' is assigned but its value is never used
Compilation succeeded - 4 warning(s)
cp SteamAuth/SteamAuth/packages/Newtonsoft.Json.11.0.1/lib/net45/Newtonsoft.Json.dll build/
mcs -out:build/steamguard -r:build/SteamAuth.dll -r:build/Newtonsoft.Json.dll -r:/usr/lib/mono/4.5/System.Security.dll Program.cs Manifest.cs AssemblyInfo.cs Utils.cs
error CS0006: Metadata file `/usr/lib/mono/4.5/System.Security.dll' could not be found
Compilation failed: 1 error(s), 0 warnings
make: *** [all] Error 1

The docs don't explicitly mention Mac support but based on other issues it seems like it should be possible. Is there a proper way to install on a Mac?

Application not opening on Antergos (Arch) Linux

I did all the steps correctly and had problems running the application with both available commands:

bash: build/steamguard: cannot execute binary file: Exec format error

make run
build/steamguard -v
build/steamguard: build/steamguard: cannot execute binary file
make: *** [makefile:9: run] Error 126

I already tried to reinstall the requirements but it did not work.

GeneralFailure

I have GeneralFailure when trying to setup new account with username "kolya0074" on ArchLinux. Maybe this is because my password has special characters?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.