Skip to content

Commit

Permalink
1.2.3.0 Update
Browse files Browse the repository at this point in the history
* 2FA Support thanks to gmmanonymus111
    - Your 'Shared Secret' can be found in your decrypted .maFile generated from SteamDesktopAuthenticator
    - SAM will encrypt your 'Shared Secret' before saving it for future use like your password.
* Update some NuGet Packages.
  • Loading branch information
rex706 committed Feb 19, 2019
1 parent 712a485 commit c56266e
Show file tree
Hide file tree
Showing 10 changed files with 166 additions and 35 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,26 @@ 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.
* Import/Export 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.
Expand Down
2 changes: 1 addition & 1 deletion SAM/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
Expand Down
2 changes: 1 addition & 1 deletion SAM/FodyWeavers.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Weavers>
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<Costura />
</Weavers>
111 changes: 111 additions & 0 deletions SAM/FodyWeavers.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="Costura" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:all>
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="IncludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="PreloadOrder" type="xs:string">
<xs:annotation>
<xs:documentation>The order of preloaded assemblies, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:all>
<xs:attribute name="CreateTemporaryAssemblies" type="xs:boolean">
<xs:annotation>
<xs:documentation>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.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeDebugSymbols" type="xs:boolean">
<xs:annotation>
<xs:documentation>Controls if .pdbs for reference assemblies are also embedded.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableCompression" type="xs:boolean">
<xs:annotation>
<xs:documentation>Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableCleanup" type="xs:boolean">
<xs:annotation>
<xs:documentation>As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="LoadAtModuleInit" type="xs:boolean">
<xs:annotation>
<xs:documentation>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.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IgnoreSatelliteAssemblies" type="xs:boolean">
<xs:annotation>
<xs:documentation>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.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ExcludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Unmanaged64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="PreloadOrder" type="xs:string">
<xs:annotation>
<xs:documentation>The order of preloaded assemblies, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
33 changes: 23 additions & 10 deletions SAM/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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}");
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions SAM/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
19 changes: 11 additions & 8 deletions SAM/SAM.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Costura.Fody.3.3.2\build\Costura.Fody.props" Condition="Exists('..\packages\Costura.Fody.3.3.2\build\Costura.Fody.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -40,11 +41,14 @@
<ApplicationIcon>steam_alt-10.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="HtmlAgilityPack, Version=1.8.7.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
<HintPath>..\packages\HtmlAgilityPack.1.8.7\lib\Net45\HtmlAgilityPack.dll</HintPath>
<Reference Include="Costura, Version=3.3.2.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
<HintPath>..\packages\Costura.Fody.3.3.2\lib\net40\Costura.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="HtmlAgilityPack, Version=1.9.0.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
<HintPath>..\packages\HtmlAgilityPack.1.9.0\lib\Net45\HtmlAgilityPack.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="SteamAuth, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SteamAuth.3.0.0\lib\net45\SteamAuth.dll</HintPath>
Expand Down Expand Up @@ -170,11 +174,10 @@
<ErrorText>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}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
<Error Condition="!Exists('..\packages\Costura.Fody.3.1.0\build\Costura.Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.3.1.0\build\Costura.Fody.targets'))" />
<Error Condition="!Exists('..\packages\Fody.3.2.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.3.2.0\build\Fody.targets'))" />
<Error Condition="!Exists('..\packages\Fody.4.0.2\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.4.0.2\build\Fody.targets'))" />
<Error Condition="!Exists('..\packages\Costura.Fody.3.3.2\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.3.3.2\build\Costura.Fody.props'))" />
</Target>
<Import Project="..\packages\Costura.Fody.3.1.0\build\Costura.Fody.targets" Condition="Exists('..\packages\Costura.Fody.3.1.0\build\Costura.Fody.targets')" />
<Import Project="..\packages\Fody.3.2.0\build\Fody.targets" Condition="Exists('..\packages\Fody.3.2.0\build\Fody.targets')" />
<Import Project="..\packages\Fody.4.0.2\build\Fody.targets" Condition="Exists('..\packages\Fody.4.0.2\build\Fody.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
4 changes: 2 additions & 2 deletions SAM/TextDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<TextBox Name="UsernameBox" Padding="3,3,3,3" />
<TextBlock x:Name="TitleTextBox1" Margin="0,0,0,10" Foreground="White" ><Run/><LineBreak/><Run Text="Password*"/></TextBlock>
<PasswordBox Name="PasswordBox" PasswordChar="" Padding="3,3,3,3" />
<TextBlock x:Name="TitleTextBox2" Margin="0,0,0,10" Foreground="White" ><Run/><LineBreak/><Run Text="Shared Secret*"/></TextBlock>
<TextBox Name="SharedSecretBox" Padding="3,3,3,3" />
<TextBlock x:Name="TitleTextBox2" Margin="0,0,0,10" Foreground="White" ToolTip="Can be found in your .maFile from Steam Desktop Authenticator" ><Run/><LineBreak/><Run Text="2FA Shared Secret"/></TextBlock>
<PasswordBox Name="SharedSecretBox" PasswordChar="" Padding="3,3,3,3" />
<TextBlock x:Name="TitleTextBox3" Margin="0,0,0,10" Foreground="White" ToolTip="Enter steam profile url to get user avatar" ><Run/><LineBreak/><Run Text="Profile Url"/></TextBlock>
<TextBox Name="UrlBox" Padding="3,3,3,3" />
<TextBlock x:Name="TitleTextBox4" Margin="0,0,0,10" Foreground="White" ToolTip="Enter a description for this entry" ><Run/><LineBreak/><Run Text="Description"/></TextBlock>
Expand Down
4 changes: 2 additions & 2 deletions SAM/TextDialog.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public string PasswordText

public string SharedSecretText
{
get { return SharedSecretBox.Text; }
set { SharedSecretBox.Text = value; }
get { return SharedSecretBox.Password; }
set { SharedSecretBox.Password = value; }
}

public string UrlText
Expand Down
8 changes: 4 additions & 4 deletions SAM/packages.config
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Costura.Fody" version="3.1.0" targetFramework="net452" />
<package id="Fody" version="3.2.0" targetFramework="net452" developmentDependency="true" />
<package id="HtmlAgilityPack" version="1.8.7" targetFramework="net452" />
<package id="Costura.Fody" version="3.3.2" targetFramework="net452" />
<package id="Fody" version="4.0.2" targetFramework="net452" developmentDependency="true" />
<package id="HtmlAgilityPack" version="1.9.0" targetFramework="net452" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net452" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net452" />
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="net452" />
<package id="Newtonsoft.Json" version="8.0.2" targetFramework="net452" />
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net452" />
<package id="SteamAuth" version="3.0.0" targetFramework="net452" />
</packages>

0 comments on commit c56266e

Please sign in to comment.