Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
Added Steam Mobile Authenticator support
Browse files Browse the repository at this point in the history
  • Loading branch information
kokole committed Jan 25, 2016
1 parent 4dc4eb4 commit 6120e5c
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 5 deletions.
13 changes: 12 additions & 1 deletion SteamItemDropIdler/Open Steamworks/Open Steamworks/EResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
// General result codes
typedef enum EResult
{
k_EResultOK = 1, // success
k_EResultOK = 1, // success
k_EResultFail = 2, // generic failure
k_EResultNoConnection = 3, // no/failed network connection
// k_EResultNoConnectionRetry = 4, // OBSOLETE - removed
Expand Down Expand Up @@ -108,6 +108,17 @@ typedef enum EResult
k_EResultRestrictedDevice = 82, //
k_EResultRegionLocked = 83, //
k_EResultRateLimitExceeded = 84, //
k_EResultAccountLogonDeniedNeedTwoFactorCode = 85,
k_EResultItemOrEntryHasBeenDeleted = 86,
k_EResultTooManyLogonAttempts = 87,
k_EResultTwoFactorCodeMismatch = 88,
k_EResultTwoFactorActivationCodeMismatch = 89,
k_EResultAccountAssociatedWithMultiplePlayers = 90,
k_EResultNotModified = 91,
k_EResultNoMobileDeviceAvailable = 92,
k_EResultTimeIsOutOfSync = 93,
k_EResultSMSCodeFailed = 94,
k_EResultTooManyAccountsAccessThisResource = 95,
} EResult;

#endif // ERESULT_H
5 changes: 3 additions & 2 deletions SteamItemDropIdler/README.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
SteamItemDropIdler v2.0
SteamItemDropIdler v2.01

All this info available on: https://github.com/kokole/SteamItemDropIdler/wiki

* Features
- Works without Steam
- Steam Guard support
- Steam Mobile Authenticator support
- Multiple instance support
- Auto add free game license (for games that you idle only)
- Auto reconnect if connection to Steam servers is lost
Expand All @@ -16,7 +17,7 @@ All this info available on: https://github.com/kokole/SteamItemDropIdler/wiki
- Games that use the Inventory Service Steam API (Killing Floor 2, Rust, Unturned...)

* How to use
1. Download and extract the release to some folder from here if you have not already: https://github.com/kokole/SteamItemDropIdler/releases/download/v2.0/SteamItemDropIdler.zip
1. Download and extract the release to some folder from here if you have not already: https://github.com/kokole/SteamItemDropIdler/releases/download/v2.01/SteamItemDropIdler.zip
2. Make sure Steam is not running. SteamItemDropIdler may not work properly without this step
3. If you have Steam installed, rename your Steam folder to something else. For example, if your Steam installation is in "C:\Program Files (x86)\Steam", rename it to "C:\Program Files (x86)\Steam123". SteamItemDropIdler may not work properly without this step
4. Run SteamItemDropIdler
Expand Down
17 changes: 15 additions & 2 deletions SteamItemDropIdler/SteamItemDropIdler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ int main( int argc, char* argv[] )
case SteamServersConnected_t::k_iCallback:
clientFriends->SetPersonaState( k_EPersonaStateOnline );

if ( (*(bool( __thiscall** )(IClientUser*, AppId_t))(*(DWORD*)clientUser + 688))(clientUser, appID) ) { // BIsSubscribedApp
if ( (*(bool( __thiscall** )(IClientUser*, AppId_t))(*(DWORD*)clientUser + 692))(clientUser, appID) ) { // BIsSubscribedApp
clientUtils->SetAppIDForCurrentPipe( appID, true );
bPlayingGame = true;
}
Expand Down Expand Up @@ -183,7 +183,20 @@ int main( int argc, char* argv[] )
getchar();

// this is Set2ndFactorAuthCode, however I have to do this because IClientUser.h is outdated
(*(void( __thiscall** )(IClientUser*, const char*, bool))(*(DWORD*)clientUser + 672))(clientUser, steamGuardCode, false);
(*(void( __thiscall** )(IClientUser*, const char*, bool))(*(DWORD*)clientUser + 676))(clientUser, steamGuardCode, false);
clientUser->LogOnWithPassword( false, steamAccountName, steamAccountPassword );
break;
}
case k_EResultTwoFactorCodeMismatch:
printf( "Invalid Steam Mobile Authenticator code\n" );
case k_EResultAccountLogonDeniedNeedTwoFactorCode:
{
char steamMobileAuthenticatorCode[33];
printf( "Enter the Steam Mobile Authenticator code: " );
scanf( "%32s", steamMobileAuthenticatorCode );
getchar();

(*(void( __thiscall** )(IClientUser*, const char*))(*(DWORD*)clientUser + 196))(clientUser, steamMobileAuthenticatorCode); // SetTwoFactorCode
clientUser->LogOnWithPassword( false, steamAccountName, steamAccountPassword );
break;
}
Expand Down

0 comments on commit 6120e5c

Please sign in to comment.