Skip to content

Commit d50e3bd

Browse files
committed
- Added option to filter list quickly - Added option to drag & drop image into Authenticator addition page.
1 parent b5a5db3 commit d50e3bd

File tree

89 files changed

+26720
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+26720
-0
lines changed
+173
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
6+
<ProductVersion>8.0.30703</ProductVersion>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>{EAF2D5CE-D817-453A-8A32-3D531570AE04}</ProjectGuid>
9+
<OutputType>Library</OutputType>
10+
<AppDesignerFolder>Properties</AppDesignerFolder>
11+
<RootNamespace>WinAuth</RootNamespace>
12+
<AssemblyName>Authenticator</AssemblyName>
13+
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
14+
<TargetFrameworkProfile>
15+
</TargetFrameworkProfile>
16+
<FileAlignment>512</FileAlignment>
17+
<AssemblyVersion>3.2.3.6</AssemblyVersion>
18+
</PropertyGroup>
19+
<PropertyGroup>
20+
<DefineConstants Condition="$([System.Version]::Parse('$(TargetFrameworkVersion.Substring(1))').CompareTo($([System.Version]::Parse('4.5.1')))) &gt;= 0">$(DefineConstants);NETFX_451</DefineConstants>
21+
<DefineConstants Condition="$([System.Version]::Parse('$(TargetFrameworkVersion.Substring(1))').CompareTo($([System.Version]::Parse('4.5')))) &gt;= 0">$(DefineConstants);NETFX_45</DefineConstants>
22+
<DefineConstants Condition="$([System.Version]::Parse('$(TargetFrameworkVersion.Substring(1))').CompareTo($([System.Version]::Parse('4.0')))) &gt;= 0">$(DefineConstants);NETFX_40</DefineConstants>
23+
<DefineConstants Condition="$([System.Version]::Parse('$(TargetFrameworkVersion.Substring(1))').CompareTo($([System.Version]::Parse('3.5')))) &gt;= 0">$(DefineConstants);NETFX_35</DefineConstants>
24+
<DefineConstants Condition="$([System.Version]::Parse('$(TargetFrameworkVersion.Substring(1))').CompareTo($([System.Version]::Parse('3.0')))) &gt;= 0">$(DefineConstants);NETFX_30</DefineConstants>
25+
</PropertyGroup>
26+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
27+
<PlatformTarget>AnyCPU</PlatformTarget>
28+
<DebugSymbols>true</DebugSymbols>
29+
<DebugType>full</DebugType>
30+
<Optimize>false</Optimize>
31+
<OutputPath>..\Net3.5\x86\bin\Debug\</OutputPath>
32+
<IntermediateOutputPath>..\Net3.5\x86\obj\Debug\</IntermediateOutputPath>
33+
<DefineConstants>TRACE;DEBUG;NETFX_3</DefineConstants>
34+
<ErrorReport>prompt</ErrorReport>
35+
<WarningLevel>4</WarningLevel>
36+
<Prefer32Bit>false</Prefer32Bit>
37+
</PropertyGroup>
38+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
39+
<PlatformTarget>AnyCPU</PlatformTarget>
40+
<DebugType>pdbonly</DebugType>
41+
<Optimize>true</Optimize>
42+
<OutputPath>..\Net3.5\x86\bin\Release\</OutputPath>
43+
<IntermediateOutputPath>..\Net3.5\x86\obj\Release\</IntermediateOutputPath>
44+
<DefineConstants>TRACE;NETFX_3</DefineConstants>
45+
<ErrorReport>prompt</ErrorReport>
46+
<WarningLevel>4</WarningLevel>
47+
<Prefer32Bit>false</Prefer32Bit>
48+
</PropertyGroup>
49+
<PropertyGroup>
50+
<StartupObject>
51+
</StartupObject>
52+
</PropertyGroup>
53+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
54+
<DebugSymbols>true</DebugSymbols>
55+
<OutputPath>..\Net3.5\bin\Debug\</OutputPath>
56+
<IntermediateOutputPath>..\Net3.5\obj\Debug\</IntermediateOutputPath>
57+
<DefineConstants>TRACE;DEBUG;NETFX_3</DefineConstants>
58+
<DebugType>full</DebugType>
59+
<PlatformTarget>AnyCPU</PlatformTarget>
60+
<ErrorReport>prompt</ErrorReport>
61+
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
62+
<Prefer32Bit>false</Prefer32Bit>
63+
</PropertyGroup>
64+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
65+
<OutputPath>..\Net3.5\bin\Release\</OutputPath>
66+
<IntermediateOutputPath>..\Net3.5\obj\Release\</IntermediateOutputPath>
67+
<DefineConstants>TRACE;NETFX_3</DefineConstants>
68+
<Optimize>true</Optimize>
69+
<DebugType>pdbonly</DebugType>
70+
<PlatformTarget>AnyCPU</PlatformTarget>
71+
<ErrorReport>prompt</ErrorReport>
72+
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
73+
<Prefer32Bit>false</Prefer32Bit>
74+
</PropertyGroup>
75+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
76+
<DebugSymbols>true</DebugSymbols>
77+
<OutputPath>..\Net3.5\x64\bin\Debug\</OutputPath>
78+
<IntermediateOutputPath>..\Net3.5\x64\obj\Debug\</IntermediateOutputPath>
79+
<DefineConstants>TRACE;DEBUG;NETFX_3</DefineConstants>
80+
<DebugType>full</DebugType>
81+
<PlatformTarget>x64</PlatformTarget>
82+
<ErrorReport>prompt</ErrorReport>
83+
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
84+
</PropertyGroup>
85+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
86+
<OutputPath>..\Net3.5\x64\bin\Release\</OutputPath>
87+
<IntermediateOutputPath>..\Net3.5\x64\obj\Release\</IntermediateOutputPath>
88+
<DefineConstants>TRACE;NETFX_3</DefineConstants>
89+
<Optimize>true</Optimize>
90+
<DebugType>pdbonly</DebugType>
91+
<PlatformTarget>x64</PlatformTarget>
92+
<ErrorReport>prompt</ErrorReport>
93+
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
94+
</PropertyGroup>
95+
<ItemGroup>
96+
<Reference Include="BouncyCastle.Crypto, Version=1.7.4137.9283, Culture=neutral, PublicKeyToken=a4292a325f69b123, processorArchitecture=MSIL">
97+
<HintPath>..\Net3.5\packages\BouncyCastle.1.7.0\lib\Net20\BouncyCastle.Crypto.dll</HintPath>
98+
<Private>True</Private>
99+
</Reference>
100+
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
101+
<HintPath>..\Net3.5\packages\Newtonsoft.Json.6.0.8\lib\net35\Newtonsoft.Json.dll</HintPath>
102+
<Private>True</Private>
103+
</Reference>
104+
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
105+
<HintPath>..\Net3.5\packages\NLog.4.2.3\lib\net35\NLog.dll</HintPath>
106+
<Private>True</Private>
107+
</Reference>
108+
<Reference Include="System">
109+
<Name>System</Name>
110+
</Reference>
111+
<Reference Include="System.Data">
112+
<Name>System.Data</Name>
113+
</Reference>
114+
<Reference Include="System.Security" />
115+
<Reference Include="System.Web" />
116+
<Reference Include="System.Xml">
117+
<Name>System.XML</Name>
118+
</Reference>
119+
</ItemGroup>
120+
<ItemGroup>
121+
<Compile Include="AuthenticatorException.cs" />
122+
<Compile Include="BattleNetAuthenticator.cs" />
123+
<Compile Include="Authenticator.cs" />
124+
<Compile Include="Base32.cs" />
125+
<Compile Include="OktaVerifyAuthenticator.cs" />
126+
<Compile Include="SteamClient.cs" />
127+
<Compile Include="HIDDevice.cs" />
128+
<Compile Include="HOTPAuthenticator.cs" />
129+
<Compile Include="Properties\Resources.Designer.cs">
130+
<AutoGen>True</AutoGen>
131+
<DesignTime>True</DesignTime>
132+
<DependentUpon>Resources.resx</DependentUpon>
133+
</Compile>
134+
<Compile Include="SteamAuthenticator.cs" />
135+
<Compile Include="TrionAuthenticator.cs" />
136+
<Compile Include="GoogleAuthenticator.cs" />
137+
<Compile Include="GuildWarsAuthenticator.cs" />
138+
<Compile Include="MicrosoftAuthenticator.cs" />
139+
<Compile Include="Properties\AssemblyInfo.cs" />
140+
<Compile Include="YubiKey.cs" />
141+
</ItemGroup>
142+
<ItemGroup>
143+
<None Include="packages.Authenticator-Net3.5.config" />
144+
<None Include="packages.config" />
145+
</ItemGroup>
146+
<ItemGroup>
147+
<EmbeddedResource Include="Properties\Resources.resx">
148+
<Generator>ResXFileCodeGenerator</Generator>
149+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
150+
</EmbeddedResource>
151+
</ItemGroup>
152+
<ItemGroup />
153+
<ItemGroup>
154+
<EmbeddedResource Include="Resources\WinAuth.YubiKey.x64.dll" />
155+
<EmbeddedResource Include="Resources\WinAuth.YubiKey.x86.dll" />
156+
</ItemGroup>
157+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
158+
<PropertyGroup>
159+
<PostBuildEvent>
160+
</PostBuildEvent>
161+
</PropertyGroup>
162+
<PropertyGroup>
163+
<PreBuildEvent>
164+
</PreBuildEvent>
165+
</PropertyGroup>
166+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
167+
Other similar extension points exist, see Microsoft.Common.targets.
168+
<Target Name="BeforeBuild">
169+
</Target>
170+
<Target Name="AfterBuild">
171+
</Target>
172+
-->
173+
</Project>
+170
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
/*
2+
* Copyright (C) 2010 Colin Mackie.
3+
* This software is distributed under the terms of the GNU General Public License.
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
19+
using System;
20+
using System.Collections.Generic;
21+
using System.IO;
22+
using System.Net;
23+
using System.Security.Cryptography;
24+
using System.Runtime.InteropServices;
25+
using System.Text;
26+
using System.Xml;
27+
using System.Xml.Serialization;
28+
29+
namespace WinAuth
30+
{
31+
/// <summary>
32+
/// Base Authenticator exception class
33+
/// </summary>
34+
public class AuthenticatorException : ApplicationException
35+
{
36+
public AuthenticatorException()
37+
: base()
38+
{
39+
}
40+
41+
public AuthenticatorException(string msg)
42+
: base(msg)
43+
{
44+
}
45+
46+
public AuthenticatorException(string msg, Exception ex)
47+
: base(msg, ex)
48+
{
49+
}
50+
}
51+
52+
/// <summary>
53+
/// Exception for reading invalid config data
54+
/// </summary>
55+
public class InvalidConfigDataException : AuthenticatorException
56+
{
57+
public InvalidConfigDataException() : base() { }
58+
}
59+
60+
/// <summary>
61+
/// Exception for invalid HMAC algorithm configuration
62+
/// </summary>
63+
public class InvalidHMACAlgorithmException : AuthenticatorException
64+
{
65+
public InvalidHMACAlgorithmException() : base() { }
66+
}
67+
68+
/// <summary>
69+
/// Exception for invalid user decryption
70+
/// </summary>
71+
public class InvalidUserDecryptionException : AuthenticatorException
72+
{
73+
public InvalidUserDecryptionException() : base() { }
74+
}
75+
76+
/// <summary>
77+
/// Exception for invalid machine decryption
78+
/// </summary>
79+
public class InvalidMachineDecryptionException : AuthenticatorException
80+
{
81+
public InvalidMachineDecryptionException() : base() { }
82+
}
83+
84+
/// <summary>
85+
/// Exception for error or unexpected return from server for enroll
86+
/// </summary>
87+
public class InvalidEnrollResponseException : AuthenticatorException
88+
{
89+
public InvalidEnrollResponseException(string msg = null, Exception ex = null) : base(msg, ex) { }
90+
}
91+
92+
/// <summary>
93+
/// Exception for error or unexpected return from server for trades
94+
/// </summary>
95+
public class InvalidTradesResponseException : AuthenticatorException
96+
{
97+
public InvalidTradesResponseException(string msg = null, Exception ex = null) : base(msg, ex) { }
98+
}
99+
100+
/// <summary>
101+
/// Exception for error or unexpected return from server for sync
102+
/// </summary>
103+
public class InvalidSyncResponseException : AuthenticatorException
104+
{
105+
public InvalidSyncResponseException(string msg) : base(msg) { }
106+
}
107+
108+
/// <summary>
109+
/// Config has been encrypted and we need a key
110+
/// </summary>
111+
public class EncryptedSecretDataException : AuthenticatorException
112+
{
113+
public EncryptedSecretDataException() : base() { }
114+
}
115+
116+
/// <summary>
117+
/// Config decryption bad password
118+
/// </summary>
119+
public class BadPasswordException : AuthenticatorException
120+
{
121+
public BadPasswordException(string msg = null, Exception ex = null) : base(msg, ex) { }
122+
}
123+
124+
public class InvalidRestoreResponseException : AuthenticatorException
125+
{
126+
public InvalidRestoreResponseException(string msg) : base(msg) { }
127+
}
128+
129+
public class InvalidRestoreCodeException : InvalidRestoreResponseException
130+
{
131+
public InvalidRestoreCodeException(string msg) : base(msg) { }
132+
}
133+
134+
/// <summary>
135+
/// Invalid encryption detected
136+
/// </summary>
137+
public class InvalidEncryptionException : AuthenticatorException
138+
{
139+
public InvalidEncryptionException(string plain, string password, string encrypted, string decrypted) : base()
140+
{
141+
Plain = plain;
142+
Password = password;
143+
Encrypted = encrypted;
144+
Decrypted = decrypted;
145+
}
146+
147+
public string Plain { get; set; }
148+
public string Password { get; set; }
149+
public string Encrypted { get; set; }
150+
public string Decrypted { get; set; }
151+
}
152+
153+
/// <summary>
154+
/// Error on setting secret data (invalid decoding) caused by corruption or wrong password
155+
/// </summary>
156+
public class InvalidSecretDataException : AuthenticatorException
157+
{
158+
public InvalidSecretDataException(Exception inner, string password, string encType, List<string> decrypted)
159+
: base("Error decoding Secret Data", inner)
160+
{
161+
Password = password;
162+
EncType = encType;
163+
Decrypted = decrypted;
164+
}
165+
166+
public string Password { get; set; }
167+
public string EncType { get; set; }
168+
public List<string> Decrypted { get; set; }
169+
}
170+
}

0 commit comments

Comments
 (0)