diff --git a/README.md b/README.md
index e71cb26..4046963 100644
--- a/README.md
+++ b/README.md
@@ -10,6 +10,7 @@ Easily switch between steam accounts.
**Features**
* 1-click Steam logins for multiple accounts.
+* 2FA Support.
* Auto login a selected or the most recently used account.
* Encrypts saved user password.
* Adjust number of accounts per row.
@@ -17,15 +18,18 @@ Easily switch between steam accounts.
* Start with windows.
* Start minimized.
-
-**External Packages**
-
-* HtmlAgilityPack
------------------------------------
**CHANGELOG**
-**Latest version:** 1.2.2.0
+**Latest version:** 1.2.3.0
+* 2FA Support thanks to [gmmanonymus111](https://github.com/gmmanonymus111)
+ - Your 'Shared Secret' can be found in your decrypted .maFile generated from [SteamDesktopAuthenticator](https://github.com/Jessecar96/SteamDesktopAuthenticator)
+ - SAM will encrypt your 'Shared Secret' before saving it for future use like your password.
+* Update some NuGet Packages.
+
+
+1.2.2.0
* Much better handling of profile image scrape.
- No longer relies on image source pattern.
* Reload all images from edit drop down.
diff --git a/SAM/App.config b/SAM/App.config
index 151cc15..776d315 100644
--- a/SAM/App.config
+++ b/SAM/App.config
@@ -7,7 +7,7 @@
-
+
diff --git a/SAM/FodyWeavers.xml b/SAM/FodyWeavers.xml
index c6e1b7c..a5dcf04 100644
--- a/SAM/FodyWeavers.xml
+++ b/SAM/FodyWeavers.xml
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/SAM/FodyWeavers.xsd b/SAM/FodyWeavers.xsd
new file mode 100644
index 0000000..44a5374
--- /dev/null
+++ b/SAM/FodyWeavers.xsd
@@ -0,0 +1,111 @@
+
+
+
+
+
+
+
+
+
+
+
+ A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks
+
+
+
+
+ A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.
+
+
+
+
+ A list of unmanaged 32 bit assembly names to include, delimited with line breaks.
+
+
+
+
+ A list of unmanaged 64 bit assembly names to include, delimited with line breaks.
+
+
+
+
+ The order of preloaded assemblies, delimited with line breaks.
+
+
+
+
+
+ This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.
+
+
+
+
+ Controls if .pdbs for reference assemblies are also embedded.
+
+
+
+
+ Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.
+
+
+
+
+ As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.
+
+
+
+
+ Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.
+
+
+
+
+ Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.
+
+
+
+
+ A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |
+
+
+
+
+ A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.
+
+
+
+
+ A list of unmanaged 32 bit assembly names to include, delimited with |.
+
+
+
+
+ A list of unmanaged 64 bit assembly names to include, delimited with |.
+
+
+
+
+ The order of preloaded assemblies, delimited with |.
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/SAM/MainWindow.xaml.cs b/SAM/MainWindow.xaml.cs
index 96da9ea..e8be9db 100644
--- a/SAM/MainWindow.xaml.cs
+++ b/SAM/MainWindow.xaml.cs
@@ -594,17 +594,30 @@ private void Login(int index)
MessageBox.Show(m.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
- // Wait for steam 2FA window popup
- IntPtr handle = FindWindow("vguiPopupWindow", "Steam Guard - Computer Authorization Required");
- while (handle.Equals(IntPtr.Zero))
- {
- handle = FindWindow("vguiPopupWindow", "Steam Guard - Computer Authorization Required");
- }
- if (SetForegroundWindow(handle))
+
+ // Only handle 2FA if shared secret was entered.
+ if (decryptedAccounts[index].SharedSecret != null && decryptedAccounts[index].SharedSecret.Length > 0)
{
- // Generate 2FA code, then send it to the client
- System.Windows.Forms.SendKeys.SendWait(Generate2FACode(decryptedAccounts[index].SharedSecret));
- System.Windows.Forms.SendKeys.SendWait("{ENTER}");
+ // Wait for steam 2FA window popup
+ IntPtr handle = FindWindow("vguiPopupWindow", "Steam Guard - Computer Authorization Required");
+ while (handle.Equals(IntPtr.Zero))
+ {
+ handle = FindWindow("vguiPopupWindow", "Steam Guard - Computer Authorization Required");
+
+ // Check for steam warning window.
+ IntPtr warningHandle = FindWindow("vguiPopupWindow", "Steam - Warning");
+ if (!warningHandle.Equals(IntPtr.Zero))
+ {
+ //Cancel the 2FA process since Steam connection is unavailable.
+ return;
+ }
+ }
+ if (SetForegroundWindow(handle))
+ {
+ // Generate 2FA code, then send it to the client
+ System.Windows.Forms.SendKeys.SendWait(Generate2FACode(decryptedAccounts[index].SharedSecret));
+ System.Windows.Forms.SendKeys.SendWait("{ENTER}");
+ }
}
}
diff --git a/SAM/Properties/AssemblyInfo.cs b/SAM/Properties/AssemblyInfo.cs
index bb4adcf..b0a3bd7 100644
--- a/SAM/Properties/AssemblyInfo.cs
+++ b/SAM/Properties/AssemblyInfo.cs
@@ -51,5 +51,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.2.2.0")]
-[assembly: AssemblyFileVersion("1.2.2.0")]
+[assembly: AssemblyVersion("1.2.3.0")]
+[assembly: AssemblyFileVersion("1.2.3.0")]
diff --git a/SAM/SAM.csproj b/SAM/SAM.csproj
index 0b3e7b1..e757c92 100644
--- a/SAM/SAM.csproj
+++ b/SAM/SAM.csproj
@@ -1,5 +1,6 @@
+
Debug
@@ -40,11 +41,14 @@
steam_alt-10.ico
-
- ..\packages\HtmlAgilityPack.1.8.7\lib\Net45\HtmlAgilityPack.dll
+
+ ..\packages\Costura.Fody.3.3.2\lib\net40\Costura.dll
-
- ..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll
+
+ ..\packages\HtmlAgilityPack.1.9.0\lib\Net45\HtmlAgilityPack.dll
+
+
+ ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll
..\packages\SteamAuth.3.0.0\lib\net45\SteamAuth.dll
@@ -170,11 +174,10 @@
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
-
-
+