From fc0c9161375b1c065871e3e6734870a8d7b2981b Mon Sep 17 00:00:00 2001 From: Archi Date: Wed, 13 Oct 2021 23:24:07 +0200 Subject: [PATCH] Extend warnings for --cryptkey and lack of it @Abrynos --- ArchiSteamFarm.Tests/Utilities.cs | 14 +- ArchiSteamFarm.sln.DotSettings | 65 +- ArchiSteamFarm/Core/Utilities.cs | 36 +- ArchiSteamFarm/Helpers/ArchiCryptoHelper.cs | 23 + .../Localization/Strings.Designer.cs | 2477 +++++++---------- ArchiSteamFarm/Localization/Strings.resx | 12 + ArchiSteamFarm/Program.cs | 13 - ArchiSteamFarm/Steam/Storage/BotConfig.cs | 11 + ArchiSteamFarm/Storage/GlobalConfig.cs | 28 +- 9 files changed, 1112 insertions(+), 1567 deletions(-) diff --git a/ArchiSteamFarm.Tests/Utilities.cs b/ArchiSteamFarm.Tests/Utilities.cs index 446bdf4c2..a7c029c65 100644 --- a/ArchiSteamFarm.Tests/Utilities.cs +++ b/ArchiSteamFarm.Tests/Utilities.cs @@ -27,12 +27,14 @@ namespace ArchiSteamFarm.Tests { [TestClass] #pragma warning disable CA1724 public sealed class Utilities { -#pragma warning restore CA1724 [TestMethod] - public void LongPassphraseIsNotWeak() => Assert.IsFalse(TestPasswordStrength("10charsasdf").IsWeak); + public void AdditionallyForbiddenWordsWeakenPassphrases() => Assert.IsTrue(TestPasswordStrength("10charsasdf", new HashSet { "chars" }).IsWeak); [TestMethod] - public void ShortPassphraseIsWeak() => Assert.IsTrue(TestPasswordStrength("four").IsWeak); + public void ContextSpecificWordsWeakenPassphrases() => Assert.IsTrue(TestPasswordStrength("archisteamfarmpassword").IsWeak); + + [TestMethod] + public void LongPassphraseIsNotWeak() => Assert.IsFalse(TestPasswordStrength("10charsasdf").IsWeak); [TestMethod] public void RepetitiveCharactersWeakenPassphrases() => Assert.IsTrue(TestPasswordStrength("testaaaatest").IsWeak); @@ -44,9 +46,7 @@ namespace ArchiSteamFarm.Tests { public void SequentialDescendingCharactersWeakenPassphrases() => Assert.IsTrue(TestPasswordStrength("testdcbatest").IsWeak); [TestMethod] - public void ContextSpecificWordsWeakenPassphrases() => Assert.IsTrue(TestPasswordStrength("archisteamfarmpassword").IsWeak); - - [TestMethod] - public void AdditionallyForbiddenWordsWeakenPassphrases() => Assert.IsTrue(TestPasswordStrength("10charsasdf", new HashSet { "chars" }).IsWeak); + public void ShortPassphraseIsWeak() => Assert.IsTrue(TestPasswordStrength("four").IsWeak); } +#pragma warning restore CA1724 } diff --git a/ArchiSteamFarm.sln.DotSettings b/ArchiSteamFarm.sln.DotSettings index 437a29026..548d991da 100644 --- a/ArchiSteamFarm.sln.DotSettings +++ b/ArchiSteamFarm.sln.DotSettings @@ -309,9 +309,68 @@ Default Default - <?xml version="1.0" encoding="utf-16"?><Profile name="Archi"><CSReorderTypeMembers>True</CSReorderTypeMembers><AspOptimizeRegisterDirectives>True</AspOptimizeRegisterDirectives><HtmlReformatCode>True</HtmlReformatCode><JsInsertSemicolon>True</JsInsertSemicolon><FormatAttributeQuoteDescriptor>True</FormatAttributeQuoteDescriptor><CorrectVariableKindsDescriptor>True</CorrectVariableKindsDescriptor><VariablesToInnerScopesDescriptor>True</VariablesToInnerScopesDescriptor><StringToTemplatesDescriptor>True</StringToTemplatesDescriptor><JsReformatCode>True</JsReformatCode><JsFormatDocComments>True</JsFormatDocComments><RemoveRedundantQualifiersTs>True</RemoveRedundantQualifiersTs><OptimizeImportsTs>True</OptimizeImportsTs><OptimizeReferenceCommentsTs>True</OptimizeReferenceCommentsTs><PublicModifierStyleTs>True</PublicModifierStyleTs><ExplicitAnyTs>True</ExplicitAnyTs><TypeAnnotationStyleTs>True</TypeAnnotationStyleTs><RelativePathStyleTs>True</RelativePathStyleTs><AsInsteadOfCastTs>True</AsInsteadOfCastTs><XMLReformatCode>True</XMLReformatCode><CSCodeStyleAttributes ArrangeTypeAccessModifier="True" ArrangeTypeMemberAccessModifier="True" SortModifiers="True" RemoveRedundantParentheses="True" AddMissingParentheses="True" ArrangeBraces="True" ArrangeAttributes="True" ArrangeArgumentsStyle="True" ArrangeCodeBodyStyle="True" ArrangeVarStyle="True" ArrangeTrailingCommas="True" ArrangeObjectCreation="True" ArrangeDefaultValue="True" /><RemoveCodeRedundanciesVB>True</RemoveCodeRedundanciesVB><CssAlphabetizeProperties>True</CssAlphabetizeProperties><VBOptimizeImports>True</VBOptimizeImports><VBShortenReferences>True</VBShortenReferences><RemoveCodeRedundancies>True</RemoveCodeRedundancies><CSUseAutoProperty>True</CSUseAutoProperty><CSMakeFieldReadonly>True</CSMakeFieldReadonly><CSMakeAutoPropertyGetOnly>True</CSMakeAutoPropertyGetOnly><CSArrangeQualifiers>True</CSArrangeQualifiers><CSFixBuiltinTypeReferences>True</CSFixBuiltinTypeReferences><CssReformatCode>True</CssReformatCode><VBReformatCode>True</VBReformatCode><VBFormatDocComments>True</VBFormatDocComments><CSOptimizeUsings><OptimizeUsings>True</OptimizeUsings><EmbraceInRegion>False</EmbraceInRegion><RegionName></RegionName></CSOptimizeUsings><CSShortenReferences>True</CSShortenReferences><CSReformatCode>True</CSReformatCode><CSharpFormatDocComments>True</CSharpFormatDocComments><CSUpdateFileHeader>True</CSUpdateFileHeader><Xaml.RedundantFreezeAttribute>True</Xaml.RedundantFreezeAttribute><Xaml.RemoveRedundantModifiersAttribute>True</Xaml.RemoveRedundantModifiersAttribute><Xaml.RemoveRedundantNameAttribute>True</Xaml.RemoveRedundantNameAttribute><Xaml.RemoveRedundantResource>True</Xaml.RemoveRedundantResource><Xaml.RemoveRedundantCollectionProperty>True</Xaml.RemoveRedundantCollectionProperty><Xaml.RemoveRedundantAttachedPropertySetter>True</Xaml.RemoveRedundantAttachedPropertySetter><Xaml.RemoveRedundantStyledValue>True</Xaml.RemoveRedundantStyledValue><Xaml.RemoveRedundantNamespaceAlias>True</Xaml.RemoveRedundantNamespaceAlias><Xaml.RemoveForbiddenResourceName>True</Xaml.RemoveForbiddenResourceName><Xaml.RemoveRedundantGridDefinitionsAttribute>True</Xaml.RemoveRedundantGridDefinitionsAttribute><Xaml.RemoveRedundantGridSpanAttribut>True</Xaml.RemoveRedundantGridSpanAttribut><Xaml.RemoveRedundantUpdateSourceTriggerAttribute>True</Xaml.RemoveRedundantUpdateSourceTriggerAttribute><Xaml.RemoveRedundantBindingModeAttribute>True</Xaml.RemoveRedundantBindingModeAttribute><CppAddTypenameTemplateKeywords>True</CppAddTypenameTemplateKeywords><CppJoinDeclarationAndAssignmentDescriptor>True</CppJoinDeclarationAndAssignmentDescriptor><CppMakeLocalVarConstDescriptor>True</CppMakeLocalVarConstDescriptor><CppMakeMethodConst>True</CppMakeMethodConst><CppMakeMethodStatic>True</CppMakeMethodStatic><CppRemoveElseKeyword>True</CppRemoveElseKeyword><CppRemoveRedundantMemberInitializerDescriptor>True</CppRemoveRedundantMemberInitializerDescriptor><CppRemoveRedundantParentheses>True</CppRemoveRedundantParentheses><CppShortenQualifiedName>True</CppShortenQualifiedName><CppDeleteRedundantSpecifier>True</CppDeleteRedundantSpecifier><CppRemoveStatement>True</CppRemoveStatement><CppRemoveTemplateArgumentsDescriptor>True</CppRemoveTemplateArgumentsDescriptor><CppDeleteRedundantTypenameTemplateKeywords>True</CppDeleteRedundantTypenameTemplateKeywords><CppRemoveUnreachableCode>True</CppRemoveUnreachableCode><CppRemoveUnusedIncludes>True</CppRemoveUnusedIncludes><CppRemoveUnusedLambdaCaptures>True</CppRemoveUnusedLambdaCaptures><CppCStyleToStaticCastDescriptor>True</CppCStyleToStaticCastDescriptor><CppReplaceExpressionWithBooleanConst>True</CppReplaceExpressionWithBooleanConst><CppMakeIfConstexpr>True</CppMakeIfConstexpr><CppMakePostfixOperatorPrefix>True</CppMakePostfixOperatorPrefix><CppChangeSmartPointerToMakeFunction>True</CppChangeSmartPointerToMakeFunction><CppReplaceThrowWithRethrowFix>True</CppReplaceThrowWithRethrowFix><CppReplaceExpressionWithNullptr>True</CppReplaceExpressionWithNullptr><CppCodeStyleCleanupDescriptor ArrangeAuto="True" ArrangeBraces="True" ArrangeCVQualifiers="True" ArrangeFunctionDeclarations="True" ArrangeNestedNamespaces="True" ArrangeOverridingFunctions="True" ArrangeSlashesInIncludeDirectives="True" ArrangeTypeAliases="True" SortIncludeDirectives="True" SortMemberInitializers="True" /><CppReformatCode>True</CppReformatCode><CppUpdateFileHeader>True</CppUpdateFileHeader><IDEA_SETTINGS>&lt;profile version="1.0"&gt; - &lt;option name="myName" value="Archi" /&gt; -&lt;/profile&gt;</IDEA_SETTINGS></Profile> + <?xml version="1.0" encoding="utf-16"?><Profile name="Archi"><CSReorderTypeMembers>True</CSReorderTypeMembers><AspOptimizeRegisterDirectives>True</AspOptimizeRegisterDirectives><HtmlReformatCode>True</HtmlReformatCode><JsInsertSemicolon>True</JsInsertSemicolon><FormatAttributeQuoteDescriptor>True</FormatAttributeQuoteDescriptor><CorrectVariableKindsDescriptor>True</CorrectVariableKindsDescriptor><VariablesToInnerScopesDescriptor>True</VariablesToInnerScopesDescriptor><StringToTemplatesDescriptor>True</StringToTemplatesDescriptor><JsReformatCode>True</JsReformatCode><JsFormatDocComments>True</JsFormatDocComments><RemoveRedundantQualifiersTs>True</RemoveRedundantQualifiersTs><OptimizeImportsTs>True</OptimizeImportsTs><OptimizeReferenceCommentsTs>True</OptimizeReferenceCommentsTs><PublicModifierStyleTs>True</PublicModifierStyleTs><ExplicitAnyTs>True</ExplicitAnyTs><TypeAnnotationStyleTs>True</TypeAnnotationStyleTs><RelativePathStyleTs>True</RelativePathStyleTs><AsInsteadOfCastTs>True</AsInsteadOfCastTs><XMLReformatCode>True</XMLReformatCode><CSCodeStyleAttributes ArrangeTypeAccessModifier="True" ArrangeTypeMemberAccessModifier="True" SortModifiers="True" RemoveRedundantParentheses="True" AddMissingParentheses="True" ArrangeBraces="True" ArrangeAttributes="True" ArrangeArgumentsStyle="True" ArrangeCodeBodyStyle="True" ArrangeVarStyle="True" ArrangeTrailingCommas="True" ArrangeObjectCreation="True" ArrangeDefaultValue="True" ArrangeNamespaces="True" /><RemoveCodeRedundanciesVB>True</RemoveCodeRedundanciesVB><CssAlphabetizeProperties>True</CssAlphabetizeProperties><VBOptimizeImports>True</VBOptimizeImports><VBShortenReferences>True</VBShortenReferences><RemoveCodeRedundancies>True</RemoveCodeRedundancies><CSUseAutoProperty>True</CSUseAutoProperty><CSMakeFieldReadonly>True</CSMakeFieldReadonly><CSMakeAutoPropertyGetOnly>True</CSMakeAutoPropertyGetOnly><CSArrangeQualifiers>True</CSArrangeQualifiers><CSFixBuiltinTypeReferences>True</CSFixBuiltinTypeReferences><CssReformatCode>True</CssReformatCode><VBReformatCode>True</VBReformatCode><VBFormatDocComments>True</VBFormatDocComments><CSOptimizeUsings><OptimizeUsings>True</OptimizeUsings></CSOptimizeUsings><CSShortenReferences>True</CSShortenReferences><CSReformatCode>True</CSReformatCode><CSharpFormatDocComments>True</CSharpFormatDocComments><CSUpdateFileHeader>True</CSUpdateFileHeader><Xaml.RedundantFreezeAttribute>True</Xaml.RedundantFreezeAttribute><Xaml.RemoveRedundantModifiersAttribute>True</Xaml.RemoveRedundantModifiersAttribute><Xaml.RemoveRedundantNameAttribute>True</Xaml.RemoveRedundantNameAttribute><Xaml.RemoveRedundantResource>True</Xaml.RemoveRedundantResource><Xaml.RemoveRedundantCollectionProperty>True</Xaml.RemoveRedundantCollectionProperty><Xaml.RemoveRedundantAttachedPropertySetter>True</Xaml.RemoveRedundantAttachedPropertySetter><Xaml.RemoveRedundantStyledValue>True</Xaml.RemoveRedundantStyledValue><Xaml.RemoveRedundantNamespaceAlias>True</Xaml.RemoveRedundantNamespaceAlias><Xaml.RemoveForbiddenResourceName>True</Xaml.RemoveForbiddenResourceName><Xaml.RemoveRedundantGridDefinitionsAttribute>True</Xaml.RemoveRedundantGridDefinitionsAttribute><Xaml.RemoveRedundantGridSpanAttribut>True</Xaml.RemoveRedundantGridSpanAttribut><Xaml.RemoveRedundantUpdateSourceTriggerAttribute>True</Xaml.RemoveRedundantUpdateSourceTriggerAttribute><Xaml.RemoveRedundantBindingModeAttribute>True</Xaml.RemoveRedundantBindingModeAttribute><CppAddTypenameTemplateKeywords>True</CppAddTypenameTemplateKeywords><CppJoinDeclarationAndAssignmentDescriptor>True</CppJoinDeclarationAndAssignmentDescriptor><CppMakeLocalVarConstDescriptor>True</CppMakeLocalVarConstDescriptor><CppMakeMethodConst>True</CppMakeMethodConst><CppMakeMethodStatic>True</CppMakeMethodStatic><CppRemoveElseKeyword>True</CppRemoveElseKeyword><CppRemoveRedundantMemberInitializerDescriptor>True</CppRemoveRedundantMemberInitializerDescriptor><CppRemoveRedundantParentheses>True</CppRemoveRedundantParentheses><CppShortenQualifiedName>True</CppShortenQualifiedName><CppDeleteRedundantSpecifier>True</CppDeleteRedundantSpecifier><CppRemoveStatement>True</CppRemoveStatement><CppRemoveTemplateArgumentsDescriptor>True</CppRemoveTemplateArgumentsDescriptor><CppDeleteRedundantTypenameTemplateKeywords>True</CppDeleteRedundantTypenameTemplateKeywords><CppRemoveUnreachableCode>True</CppRemoveUnreachableCode><CppRemoveUnusedIncludes>True</CppRemoveUnusedIncludes><CppRemoveUnusedLambdaCaptures>True</CppRemoveUnusedLambdaCaptures><CppCStyleToStaticCastDescriptor>True</CppCStyleToStaticCastDescriptor><CppReplaceExpressionWithBooleanConst>True</CppReplaceExpressionWithBooleanConst><CppMakeIfConstexpr>True</CppMakeIfConstexpr><CppMakePostfixOperatorPrefix>True</CppMakePostfixOperatorPrefix><CppChangeSmartPointerToMakeFunction>True</CppChangeSmartPointerToMakeFunction><CppReplaceThrowWithRethrowFix>True</CppReplaceThrowWithRethrowFix><CppReplaceExpressionWithNullptr>True</CppReplaceExpressionWithNullptr><CppCodeStyleCleanupDescriptor ArrangeAuto="True" ArrangeBraces="True" ArrangeCVQualifiers="True" ArrangeFunctionDeclarations="True" ArrangeNestedNamespaces="True" ArrangeOverridingFunctions="True" ArrangeSlashesInIncludeDirectives="True" ArrangeTypeAliases="True" SortIncludeDirectives="True" SortMemberInitializers="True" /><CppReformatCode>True</CppReformatCode><CppUpdateFileHeader>True</CppUpdateFileHeader><IDEA_SETTINGS>&lt;profile version="1.0"&gt; + &lt;option name="myName" value="Archi" /&gt; + &lt;inspection_tool class="ConditionalExpressionWithIdenticalBranchesJS" enabled="true" level="WARNING" enabled_by_default="true" /&gt; + &lt;inspection_tool class="ES6ShorthandObjectProperty" enabled="true" level="WARNING" enabled_by_default="true" /&gt; + &lt;inspection_tool class="JSArrowFunctionBracesCanBeRemoved" enabled="true" level="WARNING" enabled_by_default="true" /&gt; + &lt;inspection_tool class="JSRemoveUnnecessaryParentheses" enabled="true" level="WARNING" enabled_by_default="true" /&gt; + &lt;inspection_tool class="TypeScriptExplicitMemberType" enabled="true" level="WARNING" enabled_by_default="true" /&gt; + &lt;inspection_tool class="UnterminatedStatementJS" enabled="true" level="WARNING" enabled_by_default="true" /&gt; +&lt;/profile&gt;</IDEA_SETTINGS><ShaderLabReformatCode>True</ShaderLabReformatCode><CppRemoveCastDescriptor>True</CppRemoveCastDescriptor><CppRemoveElaboratedTypeSpecifierDescriptor>True</CppRemoveElaboratedTypeSpecifierDescriptor><CppRemoveRedundantLambdaParameterListDescriptor>True</CppRemoveRedundantLambdaParameterListDescriptor><CppTypeTraitAliasDescriptor>True</CppTypeTraitAliasDescriptor><CppReplaceTieWithStructuredBindingDescriptor>True</CppReplaceTieWithStructuredBindingDescriptor><CppUseAssociativeContainsDescriptor>True</CppUseAssociativeContainsDescriptor><CppUseEraseAlgorithmDescriptor>True</CppUseEraseAlgorithmDescriptor><RIDER_SETTINGS>&lt;profile&gt; + &lt;Language id="CSS"&gt; + &lt;Rearrange&gt;true&lt;/Rearrange&gt; + &lt;Reformat&gt;true&lt;/Reformat&gt; + &lt;/Language&gt; + &lt;Language id="EditorConfig"&gt; + &lt;Reformat&gt;true&lt;/Reformat&gt; + &lt;/Language&gt; + &lt;Language id="HTML"&gt; + &lt;OptimizeImports&gt;true&lt;/OptimizeImports&gt; + &lt;Rearrange&gt;true&lt;/Rearrange&gt; + &lt;Reformat&gt;true&lt;/Reformat&gt; + &lt;/Language&gt; + &lt;Language id="HTTP Request"&gt; + &lt;Reformat&gt;true&lt;/Reformat&gt; + &lt;/Language&gt; + &lt;Language id="Handlebars"&gt; + &lt;Reformat&gt;true&lt;/Reformat&gt; + &lt;/Language&gt; + &lt;Language id="Ini"&gt; + &lt;Reformat&gt;true&lt;/Reformat&gt; + &lt;/Language&gt; + &lt;Language id="JSON"&gt; + &lt;Reformat&gt;true&lt;/Reformat&gt; + &lt;/Language&gt; + &lt;Language id="Jade"&gt; + &lt;Reformat&gt;true&lt;/Reformat&gt; + &lt;/Language&gt; + &lt;Language id="JavaScript"&gt; + &lt;OptimizeImports&gt;true&lt;/OptimizeImports&gt; + &lt;Rearrange&gt;true&lt;/Rearrange&gt; + &lt;Reformat&gt;true&lt;/Reformat&gt; + &lt;/Language&gt; + &lt;Language id="Markdown"&gt; + &lt;Reformat&gt;true&lt;/Reformat&gt; + &lt;/Language&gt; + &lt;Language id="Properties"&gt; + &lt;Reformat&gt;true&lt;/Reformat&gt; + &lt;/Language&gt; + &lt;Language id="RELAX-NG"&gt; + &lt;Reformat&gt;true&lt;/Reformat&gt; + &lt;/Language&gt; + &lt;Language id="SQL"&gt; + &lt;Reformat&gt;true&lt;/Reformat&gt; + &lt;/Language&gt; + &lt;Language id="XML"&gt; + &lt;OptimizeImports&gt;true&lt;/OptimizeImports&gt; + &lt;Rearrange&gt;true&lt;/Rearrange&gt; + &lt;Reformat&gt;true&lt;/Reformat&gt; + &lt;/Language&gt; + &lt;Language id="yaml"&gt; + &lt;Reformat&gt;true&lt;/Reformat&gt; + &lt;/Language&gt; +&lt;/profile&gt;</RIDER_SETTINGS></Profile> Archi USE_TABS_ONLY True diff --git a/ArchiSteamFarm/Core/Utilities.cs b/ArchiSteamFarm/Core/Utilities.cs index ebdd743a1..e0b28f647 100644 --- a/ArchiSteamFarm/Core/Utilities.cs +++ b/ArchiSteamFarm/Core/Utilities.cs @@ -19,10 +19,12 @@ // See the License for the specific language governing permissions and // limitations under the License. +#if NETFRAMEWORK +using JustArchiNET.Madness; +#endif using System; using System.Collections.Generic; using System.Collections.Immutable; -using System.Globalization; using System.IO; using System.Linq; using System.Net; @@ -31,16 +33,12 @@ using System.Threading; using System.Threading.Tasks; using AngleSharp.Dom; using AngleSharp.XPath; -using ArchiSteamFarm.Localization; using ArchiSteamFarm.Storage; using Humanizer; using Humanizer.Localisation; using JetBrains.Annotations; using SteamKit2; using Zxcvbn; -#if NETFRAMEWORK -using JustArchiNET.Madness; -#endif namespace ArchiSteamFarm.Core { public static class Utilities { @@ -329,6 +327,20 @@ namespace ArchiSteamFarm.Core { } } + internal static bool RelativeDirectoryStartsWith(string directory, params string[] prefixes) { + if (string.IsNullOrEmpty(directory)) { + throw new ArgumentNullException(nameof(directory)); + } + +#pragma warning disable CA1508 // False positive, params could be null when explicitly set + if ((prefixes == null) || (prefixes.Length == 0)) { +#pragma warning restore CA1508 // False positive, params could be null when explicitly set + throw new ArgumentNullException(nameof(prefixes)); + } + + return (from prefix in prefixes where directory.Length > prefix.Length let pathSeparator = directory[prefix.Length] where (pathSeparator == Path.DirectorySeparatorChar) || (pathSeparator == Path.AltDirectorySeparatorChar) select prefix).Any(prefix => directory.StartsWith(prefix, StringComparison.Ordinal)); + } + internal static (bool IsWeak, string? Reason) TestPasswordStrength(string password, ISet? additionallyForbiddenPhrases = null) { if (string.IsNullOrEmpty(password)) { throw new ArgumentNullException(nameof(password)); @@ -345,19 +357,5 @@ namespace ArchiSteamFarm.Core { return (result.Score < 4, string.IsNullOrEmpty(feedback.Warning) ? feedback.Suggestions.FirstOrDefault() : feedback.Warning); } - - internal static bool RelativeDirectoryStartsWith(string directory, params string[] prefixes) { - if (string.IsNullOrEmpty(directory)) { - throw new ArgumentNullException(nameof(directory)); - } - -#pragma warning disable CA1508 // False positive, params could be null when explicitly set - if ((prefixes == null) || (prefixes.Length == 0)) { -#pragma warning restore CA1508 // False positive, params could be null when explicitly set - throw new ArgumentNullException(nameof(prefixes)); - } - - return (from prefix in prefixes where directory.Length > prefix.Length let pathSeparator = directory[prefix.Length] where (pathSeparator == Path.DirectorySeparatorChar) || (pathSeparator == Path.AltDirectorySeparatorChar) select prefix).Any(prefix => directory.StartsWith(prefix, StringComparison.Ordinal)); - } } } diff --git a/ArchiSteamFarm/Helpers/ArchiCryptoHelper.cs b/ArchiSteamFarm/Helpers/ArchiCryptoHelper.cs index c42a26261..64fd97689 100644 --- a/ArchiSteamFarm/Helpers/ArchiCryptoHelper.cs +++ b/ArchiSteamFarm/Helpers/ArchiCryptoHelper.cs @@ -24,21 +24,29 @@ using OperatingSystem = JustArchiNET.Madness.OperatingSystemMadness.OperatingSys #endif using System; using System.Collections.Generic; +using System.Collections.Immutable; using System.ComponentModel; +using System.Globalization; using System.Linq; using System.Security.Cryptography; using System.Text; using ArchiSteamFarm.Core; +using ArchiSteamFarm.Localization; using CryptSharp.Utility; using SteamKit2; namespace ArchiSteamFarm.Helpers { public static class ArchiCryptoHelper { private const byte DefaultHashLength = 32; + private const byte MinimumRecommendedCryptKeyBytes = 32; private const ushort SteamParentalPbkdf2Iterations = 10000; private const byte SteamParentalSCryptBlocksCount = 8; private const ushort SteamParentalSCryptIterations = 8192; + internal static bool HasDefaultCryptKey { get; private set; } = true; + + private static readonly ImmutableHashSet ForbiddenCryptKeyPhrases = ImmutableHashSet.Create(StringComparer.InvariantCultureIgnoreCase, "crypt", "key", "cryptkey"); + private static IEnumerable SteamParentalCharacters => Enumerable.Range('0', 10).Select(static character => (byte) character); private static IEnumerable SteamParentalCodes { @@ -158,7 +166,22 @@ namespace ArchiSteamFarm.Helpers { throw new ArgumentNullException(nameof(key)); } + Utilities.InBackground( + () => { + (bool isWeak, string? reason) = Utilities.TestPasswordStrength(key, ForbiddenCryptKeyPhrases); + + if (isWeak) { + ASF.ArchiLogger.LogGenericWarning(string.Format(CultureInfo.CurrentCulture, Strings.WarningWeakCryptKey, reason)); + } + } + ); + EncryptionKey = Encoding.UTF8.GetBytes(key); + HasDefaultCryptKey = false; + + if (EncryptionKey.Length < MinimumRecommendedCryptKeyBytes) { + ASF.ArchiLogger.LogGenericWarning(string.Format(CultureInfo.CurrentCulture, Strings.WarningTooShortCryptKey, MinimumRecommendedCryptKeyBytes)); + } } private static string? DecryptAES(string encryptedString) { diff --git a/ArchiSteamFarm/Localization/Strings.Designer.cs b/ArchiSteamFarm/Localization/Strings.Designer.cs index 141db9cdd..0ff55295a 100644 --- a/ArchiSteamFarm/Localization/Strings.Designer.cs +++ b/ArchiSteamFarm/Localization/Strings.Designer.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -12,46 +11,32 @@ namespace ArchiSteamFarm.Localization { using System; - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class Strings { - private static global::System.Resources.ResourceManager resourceMan; + private static System.Resources.ResourceManager resourceMan; - private static global::System.Globalization.CultureInfo resourceCulture; + private static System.Globalization.CultureInfo resourceCulture; - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal Strings() { } - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - public static global::System.Resources.ResourceManager ResourceManager { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + public static System.Resources.ResourceManager ResourceManager { get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ArchiSteamFarm.Localization.Strings", typeof(Strings).Assembly); + if (object.Equals(null, resourceMan)) { + System.Resources.ResourceManager temp = new System.Resources.ResourceManager("ArchiSteamFarm.Localization.Strings", typeof(Strings).Assembly); resourceMan = temp; } return resourceMan; } } - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - public static global::System.Globalization.CultureInfo Culture { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + public static System.Globalization.CultureInfo Culture { get { return resourceCulture; } @@ -60,1663 +45,1125 @@ namespace ArchiSteamFarm.Localization { } } - /// - /// Looks up a localized string similar to Accepting trade: {0}. - /// public static string AcceptingTrade { get { return ResourceManager.GetString("AcceptingTrade", resourceCulture); } } - /// - /// Looks up a localized string similar to Matching Steam items, round #{0}.... - /// - public static string ActivelyMatchingItems { - get { - return ResourceManager.GetString("ActivelyMatchingItems", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Matched a total of {0} sets this round.. - /// - public static string ActivelyMatchingItemsRound { - get { - return ResourceManager.GetString("ActivelyMatchingItemsRound", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to {0} config file will be migrated to the latest syntax.... - /// - public static string AutomaticFileMigration { - get { - return ResourceManager.GetString("AutomaticFileMigration", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to ASF will automatically check for new versions every {0}.. - /// public static string AutoUpdateCheckInfo { get { return ResourceManager.GetString("AutoUpdateCheckInfo", resourceCulture); } } - /// - /// Looks up a localized string similar to Accepted donation trade: {0}. - /// - public static string BotAcceptedDonationTrade { - get { - return ResourceManager.GetString("BotAcceptedDonationTrade", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Accepting gift: {0}.... - /// - public static string BotAcceptingGift { - get { - return ResourceManager.GetString("BotAcceptingGift", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Account is no longer occupied: farming process resumed!. - /// - public static string BotAccountFree { - get { - return ResourceManager.GetString("BotAccountFree", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to This account is limited, farming process is unavailable until the restriction is removed!. - /// - public static string BotAccountLimited { - get { - return ResourceManager.GetString("BotAccountLimited", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to This account is locked, farming process is permanently unavailable!. - /// - public static string BotAccountLocked { - get { - return ResourceManager.GetString("BotAccountLocked", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Account is currently being used: ASF will resume farming when it's free.... - /// - public static string BotAccountOccupied { - get { - return ResourceManager.GetString("BotAccountOccupied", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to ID: {0} | Status: {1}. - /// - public static string BotAddLicense { - get { - return ResourceManager.GetString("BotAddLicense", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to ID: {0} | Status: {1} | Items: {2}. - /// - public static string BotAddLicenseWithItems { - get { - return ResourceManager.GetString("BotAddLicenseWithItems", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to This bot is already running!. - /// - public static string BotAlreadyRunning { - get { - return ResourceManager.GetString("BotAlreadyRunning", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to This bot has already stopped!. - /// - public static string BotAlreadyStopped { - get { - return ResourceManager.GetString("BotAlreadyStopped", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Converting .maFile into ASF format.... - /// - public static string BotAuthenticatorConverting { - get { - return ResourceManager.GetString("BotAuthenticatorConverting", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Successfully finished importing mobile authenticator!. - /// - public static string BotAuthenticatorImportFinished { - get { - return ResourceManager.GetString("BotAuthenticatorImportFinished", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to 2FA Token: {0}. - /// - public static string BotAuthenticatorToken { - get { - return ResourceManager.GetString("BotAuthenticatorToken", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Automatic farming has paused!. - /// - public static string BotAutomaticIdlingNowPaused { - get { - return ResourceManager.GetString("BotAutomaticIdlingNowPaused", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Automatic farming has resumed!. - /// - public static string BotAutomaticIdlingNowResumed { - get { - return ResourceManager.GetString("BotAutomaticIdlingNowResumed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Automatic farming is paused already!. - /// - public static string BotAutomaticIdlingPausedAlready { - get { - return ResourceManager.GetString("BotAutomaticIdlingPausedAlready", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Automatic farming is resumed already!. - /// - public static string BotAutomaticIdlingResumedAlready { - get { - return ResourceManager.GetString("BotAutomaticIdlingResumedAlready", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Connected to Steam!. - /// - public static string BotConnected { - get { - return ResourceManager.GetString("BotConnected", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Connecting.... - /// - public static string BotConnecting { - get { - return ResourceManager.GetString("BotConnecting", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Connection to Steam Network lost. Reconnecting.... - /// - public static string BotConnectionLost { - get { - return ResourceManager.GetString("BotConnectionLost", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Disconnected from Steam!. - /// - public static string BotDisconnected { - get { - return ResourceManager.GetString("BotDisconnected", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Disconnecting.... - /// - public static string BotDisconnecting { - get { - return ResourceManager.GetString("BotDisconnecting", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to [{0}] password: {1}. - /// - public static string BotEncryptedPassword { - get { - return ResourceManager.GetString("BotEncryptedPassword", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Waiting up to {0} to ensure that we're free to start farming.... - /// - public static string BotExtraIdlingCooldown { - get { - return ResourceManager.GetString("BotExtraIdlingCooldown", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Bot has {0} games remaining in its background queue.. - /// - public static string BotGamesToRedeemInBackgroundCount { - get { - return ResourceManager.GetString("BotGamesToRedeemInBackgroundCount", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Generating Steam parental code, this can take a while, consider putting it in the config instead.... - /// - public static string BotGeneratingSteamParentalCode { - get { - return ResourceManager.GetString("BotGeneratingSteamParentalCode", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Successfully handled {0} confirmations!. - /// - public static string BotHandledConfirmations { - get { - return ResourceManager.GetString("BotHandledConfirmations", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Bot has no wallet.. - /// - public static string BotHasNoWallet { - get { - return ResourceManager.GetString("BotHasNoWallet", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Failed to disconnect the client. Abandoning this bot instance!. - /// - public static string BotHeartBeatFailed { - get { - return ResourceManager.GetString("BotHeartBeatFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Playing selected {0}: {1}. - /// - public static string BotIdlingSelectedGames { - get { - return ResourceManager.GetString("BotIdlingSelectedGames", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Not starting this bot instance because it's disabled in config file!. - /// - public static string BotInstanceNotStartingBecauseDisabled { - get { - return ResourceManager.GetString("BotInstanceNotStartingBecauseDisabled", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Received TwoFactorCodeMismatch error code {0} times in a row. Either your 2FA credentials are no longer valid, or your clock is out of sync, aborting!. - /// - public static string BotInvalidAuthenticatorDuringLogin { - get { - return ResourceManager.GetString("BotInvalidAuthenticatorDuringLogin", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Received InvalidPassword error code {0} times in a row. Your password for this account is most likely wrong, aborting!. - /// - public static string BotInvalidPasswordDuringLogin { - get { - return ResourceManager.GetString("BotInvalidPasswordDuringLogin", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Bot has level {0}.. - /// - public static string BotLevel { - get { - return ResourceManager.GetString("BotLevel", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Logged off of Steam: {0}. - /// - public static string BotLoggedOff { - get { - return ResourceManager.GetString("BotLoggedOff", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Successfully logged on as {0}.. - /// - public static string BotLoggedOn { - get { - return ResourceManager.GetString("BotLoggedOn", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Logging in.... - /// - public static string BotLoggingIn { - get { - return ResourceManager.GetString("BotLoggingIn", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to This account seems to be used in another ASF instance, which is undefined behaviour, refusing to keep it running!. - /// - public static string BotLogonSessionReplaced { - get { - return ResourceManager.GetString("BotLogonSessionReplaced", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Trade offer failed!. - /// - public static string BotLootingFailed { - get { - return ResourceManager.GetString("BotLootingFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Trade couldn't be sent because there is no user with master permission defined!. - /// - public static string BotLootingMasterNotDefined { - get { - return ResourceManager.GetString("BotLootingMasterNotDefined", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Trade offer sent successfully!. - /// - public static string BotLootingSuccess { - get { - return ResourceManager.GetString("BotLootingSuccess", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to This bot doesn't have ASF 2FA enabled! Did you forget to import your authenticator as ASF 2FA?. - /// - public static string BotNoASFAuthenticator { - get { - return ResourceManager.GetString("BotNoASFAuthenticator", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to This bot instance is not connected!. - /// - public static string BotNotConnected { - get { - return ResourceManager.GetString("BotNotConnected", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Couldn't find any bot named {0}!. - /// - public static string BotNotFound { - get { - return ResourceManager.GetString("BotNotFound", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Not owned yet: {0}. - /// - public static string BotNotOwnedYet { - get { - return ResourceManager.GetString("BotNotOwnedYet", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Owned already: {0}. - /// - public static string BotOwnedAlready { - get { - return ResourceManager.GetString("BotOwnedAlready", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Owned already: {0} | {1}. - /// - public static string BotOwnedAlreadyWithName { - get { - return ResourceManager.GetString("BotOwnedAlreadyWithName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to {0}/{1} bots already own game {2}.. - /// - public static string BotOwnsOverviewPerGame { - get { - return ResourceManager.GetString("BotOwnsOverviewPerGame", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Points balance: {0}. - /// - public static string BotPointsBalance { - get { - return ResourceManager.GetString("BotPointsBalance", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Rate limit exceeded, we will retry after {0} of cooldown.... - /// - public static string BotRateLimitExceeded { - get { - return ResourceManager.GetString("BotRateLimitExceeded", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Reconnecting.... - /// - public static string BotReconnecting { - get { - return ResourceManager.GetString("BotReconnecting", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Key: {0} | Status: {1}. - /// - public static string BotRedeem { - get { - return ResourceManager.GetString("BotRedeem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Key: {0} | Status: {1} | Items: {2}. - /// - public static string BotRedeemWithItems { - get { - return ResourceManager.GetString("BotRedeemWithItems", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Refreshing packages data.... - /// - public static string BotRefreshingPackagesData { - get { - return ResourceManager.GetString("BotRefreshingPackagesData", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Removed expired login key!. - /// - public static string BotRemovedExpiredLoginKey { - get { - return ResourceManager.GetString("BotRemovedExpiredLoginKey", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to You can't send a trade to yourself!. - /// - public static string BotSendingTradeToYourself { - get { - return ResourceManager.GetString("BotSendingTradeToYourself", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Current memory usage: {0} MB. - ///Process uptime: {1}. - /// - public static string BotStats { - get { - return ResourceManager.GetString("BotStats", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Bot is connecting to Steam network.. - /// - public static string BotStatusConnecting { - get { - return ResourceManager.GetString("BotStatusConnecting", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Bot is farming game: {0} ({1}, {2} card drops remaining) from a total of {3} games ({4} cards) left to farm (~{5} remaining).. - /// - public static string BotStatusIdling { - get { - return ResourceManager.GetString("BotStatusIdling", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Bot is farming games: {0} from a total of {1} games ({2} cards) left to farm (~{3} remaining).. - /// - public static string BotStatusIdlingList { - get { - return ResourceManager.GetString("BotStatusIdlingList", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Bot is limited and can't drop any cards through farming.. - /// - public static string BotStatusLimited { - get { - return ResourceManager.GetString("BotStatusLimited", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Bot is locked and can't drop any cards through farming.. - /// - public static string BotStatusLocked { - get { - return ResourceManager.GetString("BotStatusLocked", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Bot is not farming anything.. - /// - public static string BotStatusNotIdling { - get { - return ResourceManager.GetString("BotStatusNotIdling", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Bot is not running.. - /// - public static string BotStatusNotRunning { - get { - return ResourceManager.GetString("BotStatusNotRunning", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to There are {0}/{1} bots running, with total of {2} games ({3} cards) left to farm.. - /// - public static string BotStatusOverview { - get { - return ResourceManager.GetString("BotStatusOverview", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Bot is paused or running in manual mode.. - /// - public static string BotStatusPaused { - get { - return ResourceManager.GetString("BotStatusPaused", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Bot is currently being used.. - /// - public static string BotStatusPlayingNotAvailable { - get { - return ResourceManager.GetString("BotStatusPlayingNotAvailable", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Could not initialize SteamDirectory: connecting with Steam Network might take much longer than usual!. - /// - public static string BotSteamDirectoryInitializationFailed { - get { - return ResourceManager.GetString("BotSteamDirectoryInitializationFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Stopping.... - /// - public static string BotStopping { - get { - return ResourceManager.GetString("BotStopping", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The trade offer {0} is determined to be {1} due to {2}.. - /// - public static string BotTradeOfferResult { - get { - return ResourceManager.GetString("BotTradeOfferResult", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Unable to login to Steam: {0}/{1}. - /// - public static string BotUnableToLogin { - get { - return ResourceManager.GetString("BotUnableToLogin", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to {0} V{1}. - /// - public static string BotVersion { - get { - return ResourceManager.GetString("BotVersion", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Wallet balance: {0} {1}. - /// - public static string BotWalletBalance { - get { - return ResourceManager.GetString("BotWalletBalance", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Checking first badge page.... - /// - public static string CheckingFirstBadgePage { - get { - return ResourceManager.GetString("CheckingFirstBadgePage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Checking other badge pages.... - /// - public static string CheckingOtherBadgePages { - get { - return ResourceManager.GetString("CheckingOtherBadgePages", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Chosen farming algorithm: {0}. - /// - public static string ChosenFarmingAlgorithm { - get { - return ResourceManager.GetString("ChosenFarmingAlgorithm", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Clearing Steam discovery queue #{0}.... - /// - public static string ClearingDiscoveryQueue { - get { - return ResourceManager.GetString("ClearingDiscoveryQueue", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Content: - ///{0}. - /// public static string Content { get { return ResourceManager.GetString("Content", resourceCulture); } } - /// - /// Looks up a localized string similar to Done!. - /// - public static string Done { - get { - return ResourceManager.GetString("Done", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Done matching Steam items, round #{0}.. - /// - public static string DoneActivelyMatchingItems { - get { - return ResourceManager.GetString("DoneActivelyMatchingItems", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Done clearing Steam discovery queue #{0}.. - /// - public static string DoneClearingDiscoveryQueue { - get { - return ResourceManager.GetString("DoneClearingDiscoveryQueue", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Enter command: . - /// - public static string EnterCommand { - get { - return ResourceManager.GetString("EnterCommand", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Aborted!. - /// - public static string ErrorAborted { - get { - return ResourceManager.GetString("ErrorAborted", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Access denied!. - /// - public static string ErrorAccessDenied { - get { - return ResourceManager.GetString("ErrorAccessDenied", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Your bot config is invalid. Please verify content of {0} and try again!. - /// - public static string ErrorBotConfigInvalid { - get { - return ResourceManager.GetString("ErrorBotConfigInvalid", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Config directory could not be found, aborting!. - /// - public static string ErrorConfigDirectoryNotFound { - get { - return ResourceManager.GetString("ErrorConfigDirectoryNotFound", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Configured {0} property is invalid: {1}. - /// public static string ErrorConfigPropertyInvalid { get { return ResourceManager.GetString("ErrorConfigPropertyInvalid", resourceCulture); } } - /// - /// Looks up a localized string similar to Persistent database could not be loaded, if issue persists, please remove {0} in order to recreate the database!. - /// - public static string ErrorDatabaseInvalid { - get { - return ResourceManager.GetString("ErrorDatabaseInvalid", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to ASF V{0} has run into fatal exception before core logging module was even able to initialize!. - /// public static string ErrorEarlyFatalExceptionInfo { get { return ResourceManager.GetString("ErrorEarlyFatalExceptionInfo", resourceCulture); } } - /// - /// Looks up a localized string similar to Exception: {0}() {1} - ///StackTrace: - ///{2}. - /// public static string ErrorEarlyFatalExceptionPrint { get { return ResourceManager.GetString("ErrorEarlyFatalExceptionPrint", resourceCulture); } } - /// - /// Looks up a localized string similar to Exiting with nonzero error code!. - /// public static string ErrorExitingWithNonZeroErrorCode { get { return ResourceManager.GetString("ErrorExitingWithNonZeroErrorCode", resourceCulture); } } - /// - /// Looks up a localized string similar to Request failing: {0}. - /// public static string ErrorFailingRequest { get { return ResourceManager.GetString("ErrorFailingRequest", resourceCulture); } } - /// - /// Looks up a localized string similar to This function is available only in headless mode!. - /// - public static string ErrorFunctionOnlyInHeadlessMode { - get { - return ResourceManager.GetString("ErrorFunctionOnlyInHeadlessMode", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Global config could not be loaded. Make sure that {0} exists and is valid! Follow 'setting up' guide on the wiki if you're confused.. - /// public static string ErrorGlobalConfigNotLoaded { get { return ResourceManager.GetString("ErrorGlobalConfigNotLoaded", resourceCulture); } } - /// - /// Looks up a localized string similar to Global config file has been removed!. - /// - public static string ErrorGlobalConfigRemoved { - get { - return ResourceManager.GetString("ErrorGlobalConfigRemoved", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Your provided CurrentCulture is invalid, ASF will keep running with the default one!. - /// - public static string ErrorInvalidCurrentCulture { - get { - return ResourceManager.GetString("ErrorInvalidCurrentCulture", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to {0} is empty!. - /// - public static string ErrorIsEmpty { - get { - return ResourceManager.GetString("ErrorIsEmpty", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to {0} is invalid!. - /// public static string ErrorIsInvalid { get { return ResourceManager.GetString("ErrorIsInvalid", resourceCulture); } } - /// - /// Looks up a localized string similar to No bots are defined. Did you forget to configure your ASF? Follow 'setting up' guide on the wiki if you're confused.. - /// public static string ErrorNoBotsDefined { get { return ResourceManager.GetString("ErrorNoBotsDefined", resourceCulture); } } - /// - /// Looks up a localized string similar to {0} is null!. - /// public static string ErrorObjectIsNull { get { return ResourceManager.GetString("ErrorObjectIsNull", resourceCulture); } } - /// - /// Looks up a localized string similar to Parsing {0} failed!. - /// public static string ErrorParsingObject { get { return ResourceManager.GetString("ErrorParsingObject", resourceCulture); } } - /// - /// Looks up a localized string similar to Request failed after {0} attempts!. - /// public static string ErrorRequestFailedTooManyTimes { get { return ResourceManager.GetString("ErrorRequestFailedTooManyTimes", resourceCulture); } } - /// - /// Looks up a localized string similar to ASF process is already running for this working directory, aborting!. - /// - public static string ErrorSingleInstanceRequired { - get { - return ResourceManager.GetString("ErrorSingleInstanceRequired", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Could not check latest version!. - /// public static string ErrorUpdateCheckFailed { get { return ResourceManager.GetString("ErrorUpdateCheckFailed", resourceCulture); } } - /// - /// Looks up a localized string similar to Could not proceed with update because there is no asset that relates to currently running version! Automatic update to that version is not possible.. - /// public static string ErrorUpdateNoAssetForThisVersion { get { return ResourceManager.GetString("ErrorUpdateNoAssetForThisVersion", resourceCulture); } } - /// - /// Looks up a localized string similar to Could not proceed with an update because that version doesn't include any assets!. - /// public static string ErrorUpdateNoAssets { get { return ResourceManager.GetString("ErrorUpdateNoAssets", resourceCulture); } } - /// - /// Looks up a localized string similar to Received a request for user input, but process is running in headless mode!. - /// public static string ErrorUserInputRunningInHeadlessMode { get { return ResourceManager.GetString("ErrorUserInputRunningInHeadlessMode", resourceCulture); } } - /// - /// Looks up a localized string similar to Executing.... - /// - public static string Executing { - get { - return ResourceManager.GetString("Executing", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Exiting.... - /// public static string Exiting { get { return ResourceManager.GetString("Exiting", resourceCulture); } } - /// - /// Looks up a localized string similar to We have a total of {0} games ({1} cards) left to farm (~{2} remaining).... - /// - public static string GamesToIdle { - get { - return ResourceManager.GetString("GamesToIdle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Global config file has been changed!. - /// - public static string GlobalConfigChanged { - get { - return ResourceManager.GetString("GlobalConfigChanged", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Farming finished!. - /// - public static string IdlingFinished { - get { - return ResourceManager.GetString("IdlingFinished", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Finished farming: {0} ({1}) after {2} of playtime!. - /// - public static string IdlingFinishedForGame { - get { - return ResourceManager.GetString("IdlingFinishedForGame", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Finished farming games: {0}. - /// - public static string IdlingFinishedForGames { - get { - return ResourceManager.GetString("IdlingFinishedForGames", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Farming {0} ({1}) is temporarily disabled, as ASF is not able to play that game at the moment.. - /// - public static string IdlingGameNotPossible { - get { - return ResourceManager.GetString("IdlingGameNotPossible", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Farming status for {0} ({1}): {2} cards remaining. - /// - public static string IdlingStatusForGame { - get { - return ResourceManager.GetString("IdlingStatusForGame", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Farming stopped!. - /// - public static string IdlingStopped { - get { - return ResourceManager.GetString("IdlingStopped", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Ignoring this request, as permanent pause is enabled!. - /// - public static string IgnoredPermanentPauseEnabled { - get { - return ResourceManager.GetString("IgnoredPermanentPauseEnabled", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Ignoring trade: {0}. - /// - public static string IgnoringTrade { - get { - return ResourceManager.GetString("IgnoringTrade", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Initializing {0}.... - /// - public static string Initializing { - get { - return ResourceManager.GetString("Initializing", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Interactive console is now active, type 'c' in order to enter command mode.. - /// - public static string InteractiveConsoleEnabled { - get { - return ResourceManager.GetString("InteractiveConsoleEnabled", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Interactive console is not available due to missing {0} config property.. - /// - public static string InteractiveConsoleNotAvailable { - get { - return ResourceManager.GetString("InteractiveConsoleNotAvailable", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to IPC config has been changed!. - /// - public static string IPCConfigChanged { - get { - return ResourceManager.GetString("IPCConfigChanged", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to IPC server ready!. - /// - public static string IPCReady { - get { - return ResourceManager.GetString("IPCReady", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Starting IPC server.... - /// - public static string IPCStarting { - get { - return ResourceManager.GetString("IPCStarting", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Logging in to {0}.... - /// - public static string LoggingIn { - get { - return ResourceManager.GetString("LoggingIn", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to No bots are running, exiting.... - /// - public static string NoBotsAreRunning { - get { - return ResourceManager.GetString("NoBotsAreRunning", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Nothing found!. - /// - public static string NothingFound { - get { - return ResourceManager.GetString("NothingFound", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to We don't have anything to farm on this account!. - /// - public static string NothingToIdle { - get { - return ResourceManager.GetString("NothingToIdle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Now farming: {0} ({1}). - /// - public static string NowIdling { - get { - return ResourceManager.GetString("NowIdling", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Now farming: {0}. - /// - public static string NowIdlingList { - get { - return ResourceManager.GetString("NowIdlingList", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Playing is currently unavailable, we'll try again later!. - /// - public static string PlayingNotAvailable { - get { - return ResourceManager.GetString("PlayingNotAvailable", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Please wait.... - /// - public static string PleaseWait { - get { - return ResourceManager.GetString("PleaseWait", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to {0} has been loaded successfully!. - /// - public static string PluginLoaded { - get { - return ResourceManager.GetString("PluginLoaded", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Loading {0} V{1}.... - /// - public static string PluginLoading { - get { - return ResourceManager.GetString("PluginLoading", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to You've loaded one or multiple custom plugins into ASF. Since we're unable to offer support for modded setups, please contact the appropriate developers of the plugins that you decided to use in case of any issues.. - /// - public static string PluginsWarning { - get { - return ResourceManager.GetString("PluginsWarning", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Refreshing our session!. - /// - public static string RefreshingOurSession { - get { - return ResourceManager.GetString("RefreshingOurSession", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Rejecting trade: {0}. - /// - public static string RejectingTrade { - get { - return ResourceManager.GetString("RejectingTrade", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Restarting.... - /// - public static string Restarting { - get { - return ResourceManager.GetString("Restarting", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Result: {0}. - /// - public static string Result { - get { - return ResourceManager.GetString("Result", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Starting.... - /// - public static string Starting { - get { - return ResourceManager.GetString("Starting", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Still farming: {0} ({1}). - /// - public static string StillIdling { - get { - return ResourceManager.GetString("StillIdling", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Still farming: {0}. - /// - public static string StillIdlingList { - get { - return ResourceManager.GetString("StillIdlingList", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Stopped farming: {0} ({1}). - /// - public static string StoppedIdling { - get { - return ResourceManager.GetString("StoppedIdling", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Stopped farming: {0}. - /// - public static string StoppedIdlingList { - get { - return ResourceManager.GetString("StoppedIdlingList", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Success!. - /// - public static string Success { - get { - return ResourceManager.GetString("Success", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Target bot instance is not connected!. - /// - public static string TargetBotNotConnected { - get { - return ResourceManager.GetString("TargetBotNotConnected", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to ASF will attempt to use your preferred {0} culture, but translation into that language is only {1} complete. Perhaps you could help us improve the ASF translation for your language?. - /// - public static string TranslationIncomplete { - get { - return ResourceManager.GetString("TranslationIncomplete", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Unknown command!. - /// - public static string UnknownCommand { - get { - return ResourceManager.GetString("UnknownCommand", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Unlocking parental account.... - /// - public static string UnlockingParentalAccount { - get { - return ResourceManager.GetString("UnlockingParentalAccount", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Unused keys: {0}. - /// - public static string UnusedKeys { - get { - return ResourceManager.GetString("UnusedKeys", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Checking for new version.... - /// - public static string UpdateCheckingNewVersion { - get { - return ResourceManager.GetString("UpdateCheckingNewVersion", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Cleaning up old files after update.... - /// - public static string UpdateCleanup { - get { - return ResourceManager.GetString("UpdateCleanup", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Downloading new version: {0} ({1} MB)... While waiting, consider donating if you appreciate the work being done! :). - /// - public static string UpdateDownloadingNewVersion { - get { - return ResourceManager.GetString("UpdateDownloadingNewVersion", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Update process finished!. - /// - public static string UpdateFinished { - get { - return ResourceManager.GetString("UpdateFinished", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to New ASF version is available! Consider updating yourself!. - /// - public static string UpdateNewVersionAvailable { - get { - return ResourceManager.GetString("UpdateNewVersionAvailable", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Local version: {0} | Remote version: {1}. - /// - public static string UpdateVersionInfo { - get { - return ResourceManager.GetString("UpdateVersionInfo", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Please enter your 2FA code from your Steam authenticator app: . - /// - public static string UserInputSteam2FA { - get { - return ResourceManager.GetString("UserInputSteam2FA", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Please enter SteamGuard auth code that was sent on your e-mail: . - /// - public static string UserInputSteamGuard { - get { - return ResourceManager.GetString("UserInputSteamGuard", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Please enter your Steam login: . - /// - public static string UserInputSteamLogin { - get { - return ResourceManager.GetString("UserInputSteamLogin", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Please enter Steam parental code: . - /// - public static string UserInputSteamParentalCode { - get { - return ResourceManager.GetString("UserInputSteamParentalCode", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Please enter your Steam password: . - /// - public static string UserInputSteamPassword { - get { - return ResourceManager.GetString("UserInputSteamPassword", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Could not get badges' information, we will try again later!. - /// - public static string WarningCouldNotCheckBadges { - get { - return ResourceManager.GetString("WarningCouldNotCheckBadges", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Could not check cards status for: {0} ({1}), we will try again later!. - /// - public static string WarningCouldNotCheckCardsStatus { - get { - return ResourceManager.GetString("WarningCouldNotCheckCardsStatus", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Usage of {0} is deprecated and will be removed in future versions of the program. Please use {1} instead.. - /// - public static string WarningDeprecated { - get { - return ResourceManager.GetString("WarningDeprecated", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to You're running more personal bot accounts than our upper recommended limit ({0}). Be advised that this setup is not supported and might cause various Steam-related issues, including account suspensions. Check out the FAQ for more details.. - /// - public static string WarningExcessiveBotsCount { - get { - return ResourceManager.GetString("WarningExcessiveBotsCount", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Failed!. - /// public static string WarningFailed { get { return ResourceManager.GetString("WarningFailed", resourceCulture); } } - /// - /// Looks up a localized string similar to Failed due to error: {0}. - /// - public static string WarningFailedWithError { + public static string GlobalConfigChanged { get { - return ResourceManager.GetString("WarningFailedWithError", resourceCulture); + return ResourceManager.GetString("GlobalConfigChanged", resourceCulture); } } - /// - /// Looks up a localized string similar to ASF detected ID mismatch for {0} ({1}) and will use ID of {2} instead.. - /// - public static string WarningIdlingGameMismatch { + public static string ErrorGlobalConfigRemoved { get { - return ResourceManager.GetString("WarningIdlingGameMismatch", resourceCulture); + return ResourceManager.GetString("ErrorGlobalConfigRemoved", resourceCulture); } } - /// - /// Looks up a localized string similar to You're using a version that is newer than the latest released version for your update channel. Please note that pre-release versions are meant for users who know how to report bugs, deal with issues and give feedback - no technical support will be given.. - /// - public static string WarningPreReleaseVersion { + public static string IgnoringTrade { get { - return ResourceManager.GetString("WarningPreReleaseVersion", resourceCulture); + return ResourceManager.GetString("IgnoringTrade", resourceCulture); } } - /// - /// Looks up a localized string similar to Please review our privacy policy section on the wiki if you're concerned about what ASF is in fact doing!. - /// - public static string WarningPrivacyPolicy { + public static string LoggingIn { get { - return ResourceManager.GetString("WarningPrivacyPolicy", resourceCulture); + return ResourceManager.GetString("LoggingIn", resourceCulture); } } - /// - /// Looks up a localized string similar to Unknown command-line argument: {0}. - /// - public static string WarningUnknownCommandLineArgument { + public static string NoBotsAreRunning { get { - return ResourceManager.GetString("WarningUnknownCommandLineArgument", resourceCulture); + return ResourceManager.GetString("NoBotsAreRunning", resourceCulture); + } + } + + public static string RefreshingOurSession { + get { + return ResourceManager.GetString("RefreshingOurSession", resourceCulture); + } + } + + public static string RejectingTrade { + get { + return ResourceManager.GetString("RejectingTrade", resourceCulture); + } + } + + public static string Restarting { + get { + return ResourceManager.GetString("Restarting", resourceCulture); + } + } + + public static string Starting { + get { + return ResourceManager.GetString("Starting", resourceCulture); + } + } + + public static string Success { + get { + return ResourceManager.GetString("Success", resourceCulture); + } + } + + public static string UnlockingParentalAccount { + get { + return ResourceManager.GetString("UnlockingParentalAccount", resourceCulture); + } + } + + public static string UpdateCheckingNewVersion { + get { + return ResourceManager.GetString("UpdateCheckingNewVersion", resourceCulture); + } + } + + public static string UpdateDownloadingNewVersion { + get { + return ResourceManager.GetString("UpdateDownloadingNewVersion", resourceCulture); + } + } + + public static string UpdateFinished { + get { + return ResourceManager.GetString("UpdateFinished", resourceCulture); + } + } + + public static string UpdateNewVersionAvailable { + get { + return ResourceManager.GetString("UpdateNewVersionAvailable", resourceCulture); + } + } + + public static string UpdateVersionInfo { + get { + return ResourceManager.GetString("UpdateVersionInfo", resourceCulture); + } + } + + public static string UserInputSteam2FA { + get { + return ResourceManager.GetString("UserInputSteam2FA", resourceCulture); + } + } + + public static string UserInputSteamGuard { + get { + return ResourceManager.GetString("UserInputSteamGuard", resourceCulture); + } + } + + public static string UserInputSteamLogin { + get { + return ResourceManager.GetString("UserInputSteamLogin", resourceCulture); + } + } + + public static string UserInputSteamParentalCode { + get { + return ResourceManager.GetString("UserInputSteamParentalCode", resourceCulture); + } + } + + public static string UserInputSteamPassword { + get { + return ResourceManager.GetString("UserInputSteamPassword", resourceCulture); } } - /// - /// Looks up a localized string similar to Received unknown value for {0}, please report this: {1}. - /// public static string WarningUnknownValuePleaseReport { get { return ResourceManager.GetString("WarningUnknownValuePleaseReport", resourceCulture); } } - /// - /// Looks up a localized string similar to You're attempting to run {0} variant of ASF in an unsupported environment: {1}. Supply --ignore-unsupported-environment argument if you really know what you're doing.. - /// - public static string WarningUnsupportedEnvironment { + public static string IPCReady { get { - return ResourceManager.GetString("WarningUnsupportedEnvironment", resourceCulture); + return ResourceManager.GetString("IPCReady", resourceCulture); } } - /// - /// Looks up a localized string similar to Your encryption key seems to be weak. Consider choosing a stronger one for increased security. Reason: {0}. - /// - public static string WarningWeakCryptKey { + public static string IPCStarting { get { - return ResourceManager.GetString("WarningWeakCryptKey", resourceCulture); + return ResourceManager.GetString("IPCStarting", resourceCulture); } } - /// - /// Looks up a localized string similar to Your IPC password seems to be weak. Consider choosing a stronger one for increased security. Reason: {0}. - /// - public static string WarningWeakIPCPassword { + public static string BotAlreadyStopped { get { - return ResourceManager.GetString("WarningWeakIPCPassword", resourceCulture); + return ResourceManager.GetString("BotAlreadyStopped", resourceCulture); } } - /// - /// Looks up a localized string similar to Your Steam password for '{0}' seems to be weak. Consider choosing a stronger one for increased security. Reason: {1}. - /// - public static string WarningWeakSteamPassword { + public static string BotNotFound { get { - return ResourceManager.GetString("WarningWeakSteamPassword", resourceCulture); + return ResourceManager.GetString("BotNotFound", resourceCulture); + } + } + + public static string BotStatusOverview { + get { + return ResourceManager.GetString("BotStatusOverview", resourceCulture); + } + } + + public static string BotStatusIdling { + get { + return ResourceManager.GetString("BotStatusIdling", resourceCulture); + } + } + + public static string BotStatusIdlingList { + get { + return ResourceManager.GetString("BotStatusIdlingList", resourceCulture); + } + } + + public static string CheckingFirstBadgePage { + get { + return ResourceManager.GetString("CheckingFirstBadgePage", resourceCulture); + } + } + + public static string CheckingOtherBadgePages { + get { + return ResourceManager.GetString("CheckingOtherBadgePages", resourceCulture); + } + } + + public static string ChosenFarmingAlgorithm { + get { + return ResourceManager.GetString("ChosenFarmingAlgorithm", resourceCulture); + } + } + + public static string Done { + get { + return ResourceManager.GetString("Done", resourceCulture); + } + } + + public static string GamesToIdle { + get { + return ResourceManager.GetString("GamesToIdle", resourceCulture); + } + } + + public static string IdlingFinished { + get { + return ResourceManager.GetString("IdlingFinished", resourceCulture); + } + } + + public static string IdlingFinishedForGame { + get { + return ResourceManager.GetString("IdlingFinishedForGame", resourceCulture); + } + } + + public static string IdlingFinishedForGames { + get { + return ResourceManager.GetString("IdlingFinishedForGames", resourceCulture); + } + } + + public static string IdlingStatusForGame { + get { + return ResourceManager.GetString("IdlingStatusForGame", resourceCulture); + } + } + + public static string IdlingStopped { + get { + return ResourceManager.GetString("IdlingStopped", resourceCulture); + } + } + + public static string IgnoredPermanentPauseEnabled { + get { + return ResourceManager.GetString("IgnoredPermanentPauseEnabled", resourceCulture); + } + } + + public static string NothingToIdle { + get { + return ResourceManager.GetString("NothingToIdle", resourceCulture); + } + } + + public static string NowIdling { + get { + return ResourceManager.GetString("NowIdling", resourceCulture); + } + } + + public static string NowIdlingList { + get { + return ResourceManager.GetString("NowIdlingList", resourceCulture); + } + } + + public static string PlayingNotAvailable { + get { + return ResourceManager.GetString("PlayingNotAvailable", resourceCulture); + } + } + + public static string StillIdling { + get { + return ResourceManager.GetString("StillIdling", resourceCulture); + } + } + + public static string StillIdlingList { + get { + return ResourceManager.GetString("StillIdlingList", resourceCulture); + } + } + + public static string StoppedIdling { + get { + return ResourceManager.GetString("StoppedIdling", resourceCulture); + } + } + + public static string StoppedIdlingList { + get { + return ResourceManager.GetString("StoppedIdlingList", resourceCulture); + } + } + + public static string UnknownCommand { + get { + return ResourceManager.GetString("UnknownCommand", resourceCulture); + } + } + + public static string WarningCouldNotCheckBadges { + get { + return ResourceManager.GetString("WarningCouldNotCheckBadges", resourceCulture); + } + } + + public static string WarningCouldNotCheckCardsStatus { + get { + return ResourceManager.GetString("WarningCouldNotCheckCardsStatus", resourceCulture); + } + } + + public static string BotAcceptingGift { + get { + return ResourceManager.GetString("BotAcceptingGift", resourceCulture); + } + } + + public static string BotAccountLimited { + get { + return ResourceManager.GetString("BotAccountLimited", resourceCulture); + } + } + + public static string BotAddLicense { + get { + return ResourceManager.GetString("BotAddLicense", resourceCulture); + } + } + + public static string BotAddLicenseWithItems { + get { + return ResourceManager.GetString("BotAddLicenseWithItems", resourceCulture); + } + } + + public static string BotAlreadyRunning { + get { + return ResourceManager.GetString("BotAlreadyRunning", resourceCulture); + } + } + + public static string BotAuthenticatorConverting { + get { + return ResourceManager.GetString("BotAuthenticatorConverting", resourceCulture); + } + } + + public static string BotAuthenticatorImportFinished { + get { + return ResourceManager.GetString("BotAuthenticatorImportFinished", resourceCulture); + } + } + + public static string BotAuthenticatorToken { + get { + return ResourceManager.GetString("BotAuthenticatorToken", resourceCulture); + } + } + + public static string BotAutomaticIdlingNowPaused { + get { + return ResourceManager.GetString("BotAutomaticIdlingNowPaused", resourceCulture); + } + } + + public static string BotAutomaticIdlingNowResumed { + get { + return ResourceManager.GetString("BotAutomaticIdlingNowResumed", resourceCulture); + } + } + + public static string BotAutomaticIdlingPausedAlready { + get { + return ResourceManager.GetString("BotAutomaticIdlingPausedAlready", resourceCulture); + } + } + + public static string BotAutomaticIdlingResumedAlready { + get { + return ResourceManager.GetString("BotAutomaticIdlingResumedAlready", resourceCulture); + } + } + + public static string BotConnected { + get { + return ResourceManager.GetString("BotConnected", resourceCulture); + } + } + + public static string BotDisconnected { + get { + return ResourceManager.GetString("BotDisconnected", resourceCulture); + } + } + + public static string BotDisconnecting { + get { + return ResourceManager.GetString("BotDisconnecting", resourceCulture); + } + } + + public static string BotEncryptedPassword { + get { + return ResourceManager.GetString("BotEncryptedPassword", resourceCulture); + } + } + + public static string BotInstanceNotStartingBecauseDisabled { + get { + return ResourceManager.GetString("BotInstanceNotStartingBecauseDisabled", resourceCulture); + } + } + + public static string BotInvalidAuthenticatorDuringLogin { + get { + return ResourceManager.GetString("BotInvalidAuthenticatorDuringLogin", resourceCulture); + } + } + + public static string BotLoggedOff { + get { + return ResourceManager.GetString("BotLoggedOff", resourceCulture); + } + } + + public static string BotLoggedOn { + get { + return ResourceManager.GetString("BotLoggedOn", resourceCulture); + } + } + + public static string BotLoggingIn { + get { + return ResourceManager.GetString("BotLoggingIn", resourceCulture); + } + } + + public static string BotLogonSessionReplaced { + get { + return ResourceManager.GetString("BotLogonSessionReplaced", resourceCulture); + } + } + + public static string BotLootingFailed { + get { + return ResourceManager.GetString("BotLootingFailed", resourceCulture); + } + } + + public static string BotLootingMasterNotDefined { + get { + return ResourceManager.GetString("BotLootingMasterNotDefined", resourceCulture); + } + } + + public static string BotLootingSuccess { + get { + return ResourceManager.GetString("BotLootingSuccess", resourceCulture); + } + } + + public static string BotSendingTradeToYourself { + get { + return ResourceManager.GetString("BotSendingTradeToYourself", resourceCulture); + } + } + + public static string BotNoASFAuthenticator { + get { + return ResourceManager.GetString("BotNoASFAuthenticator", resourceCulture); + } + } + + public static string BotNotConnected { + get { + return ResourceManager.GetString("BotNotConnected", resourceCulture); + } + } + + public static string BotNotOwnedYet { + get { + return ResourceManager.GetString("BotNotOwnedYet", resourceCulture); + } + } + + public static string BotOwnedAlreadyWithName { + get { + return ResourceManager.GetString("BotOwnedAlreadyWithName", resourceCulture); + } + } + + public static string BotPointsBalance { + get { + return ResourceManager.GetString("BotPointsBalance", resourceCulture); + } + } + + public static string BotRateLimitExceeded { + get { + return ResourceManager.GetString("BotRateLimitExceeded", resourceCulture); + } + } + + public static string BotReconnecting { + get { + return ResourceManager.GetString("BotReconnecting", resourceCulture); + } + } + + public static string BotRedeem { + get { + return ResourceManager.GetString("BotRedeem", resourceCulture); + } + } + + public static string BotRedeemWithItems { + get { + return ResourceManager.GetString("BotRedeemWithItems", resourceCulture); + } + } + + public static string BotRemovedExpiredLoginKey { + get { + return ResourceManager.GetString("BotRemovedExpiredLoginKey", resourceCulture); + } + } + + public static string BotStatusNotIdling { + get { + return ResourceManager.GetString("BotStatusNotIdling", resourceCulture); + } + } + + public static string BotStatusLimited { + get { + return ResourceManager.GetString("BotStatusLimited", resourceCulture); + } + } + + public static string BotStatusConnecting { + get { + return ResourceManager.GetString("BotStatusConnecting", resourceCulture); + } + } + + public static string BotStatusNotRunning { + get { + return ResourceManager.GetString("BotStatusNotRunning", resourceCulture); + } + } + + public static string BotStatusPaused { + get { + return ResourceManager.GetString("BotStatusPaused", resourceCulture); + } + } + + public static string BotStatusPlayingNotAvailable { + get { + return ResourceManager.GetString("BotStatusPlayingNotAvailable", resourceCulture); + } + } + + public static string BotUnableToLogin { + get { + return ResourceManager.GetString("BotUnableToLogin", resourceCulture); + } + } + + public static string ErrorIsEmpty { + get { + return ResourceManager.GetString("ErrorIsEmpty", resourceCulture); + } + } + + public static string UnusedKeys { + get { + return ResourceManager.GetString("UnusedKeys", resourceCulture); + } + } + + public static string WarningFailedWithError { + get { + return ResourceManager.GetString("WarningFailedWithError", resourceCulture); + } + } + + public static string BotConnectionLost { + get { + return ResourceManager.GetString("BotConnectionLost", resourceCulture); + } + } + + public static string BotAccountFree { + get { + return ResourceManager.GetString("BotAccountFree", resourceCulture); + } + } + + public static string BotAccountOccupied { + get { + return ResourceManager.GetString("BotAccountOccupied", resourceCulture); + } + } + + public static string BotConnecting { + get { + return ResourceManager.GetString("BotConnecting", resourceCulture); + } + } + + public static string BotHeartBeatFailed { + get { + return ResourceManager.GetString("BotHeartBeatFailed", resourceCulture); + } + } + + public static string BotSteamDirectoryInitializationFailed { + get { + return ResourceManager.GetString("BotSteamDirectoryInitializationFailed", resourceCulture); + } + } + + public static string BotStopping { + get { + return ResourceManager.GetString("BotStopping", resourceCulture); + } + } + + public static string ErrorBotConfigInvalid { + get { + return ResourceManager.GetString("ErrorBotConfigInvalid", resourceCulture); + } + } + + public static string ErrorDatabaseInvalid { + get { + return ResourceManager.GetString("ErrorDatabaseInvalid", resourceCulture); + } + } + + public static string Initializing { + get { + return ResourceManager.GetString("Initializing", resourceCulture); + } + } + + public static string WarningPrivacyPolicy { + get { + return ResourceManager.GetString("WarningPrivacyPolicy", resourceCulture); + } + } + + public static string Welcome { + get { + return ResourceManager.GetString("Welcome", resourceCulture); + } + } + + public static string ErrorInvalidCurrentCulture { + get { + return ResourceManager.GetString("ErrorInvalidCurrentCulture", resourceCulture); + } + } + + public static string TranslationIncomplete { + get { + return ResourceManager.GetString("TranslationIncomplete", resourceCulture); + } + } + + public static string IdlingGameNotPossible { + get { + return ResourceManager.GetString("IdlingGameNotPossible", resourceCulture); + } + } + + public static string WarningIdlingGameMismatch { + get { + return ResourceManager.GetString("WarningIdlingGameMismatch", resourceCulture); + } + } + + public static string BotVersion { + get { + return ResourceManager.GetString("BotVersion", resourceCulture); + } + } + + public static string BotAccountLocked { + get { + return ResourceManager.GetString("BotAccountLocked", resourceCulture); + } + } + + public static string BotStatusLocked { + get { + return ResourceManager.GetString("BotStatusLocked", resourceCulture); + } + } + + public static string ErrorFunctionOnlyInHeadlessMode { + get { + return ResourceManager.GetString("ErrorFunctionOnlyInHeadlessMode", resourceCulture); + } + } + + public static string BotOwnedAlready { + get { + return ResourceManager.GetString("BotOwnedAlready", resourceCulture); + } + } + + public static string ErrorAccessDenied { + get { + return ResourceManager.GetString("ErrorAccessDenied", resourceCulture); + } + } + + public static string WarningPreReleaseVersion { + get { + return ResourceManager.GetString("WarningPreReleaseVersion", resourceCulture); + } + } + + public static string BotStats { + get { + return ResourceManager.GetString("BotStats", resourceCulture); + } + } + + public static string ClearingDiscoveryQueue { + get { + return ResourceManager.GetString("ClearingDiscoveryQueue", resourceCulture); + } + } + + public static string DoneClearingDiscoveryQueue { + get { + return ResourceManager.GetString("DoneClearingDiscoveryQueue", resourceCulture); + } + } + + public static string BotOwnsOverviewPerGame { + get { + return ResourceManager.GetString("BotOwnsOverviewPerGame", resourceCulture); + } + } + + public static string BotRefreshingPackagesData { + get { + return ResourceManager.GetString("BotRefreshingPackagesData", resourceCulture); + } + } + + public static string WarningDeprecated { + get { + return ResourceManager.GetString("WarningDeprecated", resourceCulture); + } + } + + public static string BotAcceptedDonationTrade { + get { + return ResourceManager.GetString("BotAcceptedDonationTrade", resourceCulture); } } - /// - /// Looks up a localized string similar to Workaround for {0} bug has been triggered.. - /// public static string WarningWorkaroundTriggered { get { return ResourceManager.GetString("WarningWorkaroundTriggered", resourceCulture); } } - /// - /// Looks up a localized string similar to It looks like it's your first launch of the program, welcome!. - /// - public static string Welcome { + public static string TargetBotNotConnected { get { - return ResourceManager.GetString("Welcome", resourceCulture); + return ResourceManager.GetString("TargetBotNotConnected", resourceCulture); + } + } + + public static string BotWalletBalance { + get { + return ResourceManager.GetString("BotWalletBalance", resourceCulture); + } + } + + public static string BotHasNoWallet { + get { + return ResourceManager.GetString("BotHasNoWallet", resourceCulture); + } + } + + public static string BotLevel { + get { + return ResourceManager.GetString("BotLevel", resourceCulture); + } + } + + public static string ActivelyMatchingItems { + get { + return ResourceManager.GetString("ActivelyMatchingItems", resourceCulture); + } + } + + public static string DoneActivelyMatchingItems { + get { + return ResourceManager.GetString("DoneActivelyMatchingItems", resourceCulture); + } + } + + public static string ErrorAborted { + get { + return ResourceManager.GetString("ErrorAborted", resourceCulture); + } + } + + public static string ActivelyMatchingItemsRound { + get { + return ResourceManager.GetString("ActivelyMatchingItemsRound", resourceCulture); + } + } + + public static string WarningExcessiveBotsCount { + get { + return ResourceManager.GetString("WarningExcessiveBotsCount", resourceCulture); + } + } + + public static string PluginLoaded { + get { + return ResourceManager.GetString("PluginLoaded", resourceCulture); + } + } + + public static string PluginLoading { + get { + return ResourceManager.GetString("PluginLoading", resourceCulture); + } + } + + public static string NothingFound { + get { + return ResourceManager.GetString("NothingFound", resourceCulture); + } + } + + public static string PluginsWarning { + get { + return ResourceManager.GetString("PluginsWarning", resourceCulture); + } + } + + public static string PleaseWait { + get { + return ResourceManager.GetString("PleaseWait", resourceCulture); + } + } + + public static string EnterCommand { + get { + return ResourceManager.GetString("EnterCommand", resourceCulture); + } + } + + public static string Executing { + get { + return ResourceManager.GetString("Executing", resourceCulture); + } + } + + public static string InteractiveConsoleEnabled { + get { + return ResourceManager.GetString("InteractiveConsoleEnabled", resourceCulture); + } + } + + public static string InteractiveConsoleNotAvailable { + get { + return ResourceManager.GetString("InteractiveConsoleNotAvailable", resourceCulture); + } + } + + public static string BotGamesToRedeemInBackgroundCount { + get { + return ResourceManager.GetString("BotGamesToRedeemInBackgroundCount", resourceCulture); + } + } + + public static string ErrorSingleInstanceRequired { + get { + return ResourceManager.GetString("ErrorSingleInstanceRequired", resourceCulture); + } + } + + public static string BotHandledConfirmations { + get { + return ResourceManager.GetString("BotHandledConfirmations", resourceCulture); + } + } + + public static string BotExtraIdlingCooldown { + get { + return ResourceManager.GetString("BotExtraIdlingCooldown", resourceCulture); + } + } + + public static string UpdateCleanup { + get { + return ResourceManager.GetString("UpdateCleanup", resourceCulture); + } + } + + public static string BotGeneratingSteamParentalCode { + get { + return ResourceManager.GetString("BotGeneratingSteamParentalCode", resourceCulture); + } + } + + public static string IPCConfigChanged { + get { + return ResourceManager.GetString("IPCConfigChanged", resourceCulture); + } + } + + public static string BotTradeOfferResult { + get { + return ResourceManager.GetString("BotTradeOfferResult", resourceCulture); + } + } + + public static string BotInvalidPasswordDuringLogin { + get { + return ResourceManager.GetString("BotInvalidPasswordDuringLogin", resourceCulture); + } + } + + public static string Result { + get { + return ResourceManager.GetString("Result", resourceCulture); + } + } + + public static string WarningUnsupportedEnvironment { + get { + return ResourceManager.GetString("WarningUnsupportedEnvironment", resourceCulture); + } + } + + public static string WarningUnknownCommandLineArgument { + get { + return ResourceManager.GetString("WarningUnknownCommandLineArgument", resourceCulture); + } + } + + public static string ErrorConfigDirectoryNotFound { + get { + return ResourceManager.GetString("ErrorConfigDirectoryNotFound", resourceCulture); + } + } + + public static string BotIdlingSelectedGames { + get { + return ResourceManager.GetString("BotIdlingSelectedGames", resourceCulture); + } + } + + public static string AutomaticFileMigration { + get { + return ResourceManager.GetString("AutomaticFileMigration", resourceCulture); + } + } + + public static string WarningWeakIPCPassword { + get { + return ResourceManager.GetString("WarningWeakIPCPassword", resourceCulture); + } + } + + public static string WarningWeakSteamPassword { + get { + return ResourceManager.GetString("WarningWeakSteamPassword", resourceCulture); + } + } + + public static string WarningWeakCryptKey { + get { + return ResourceManager.GetString("WarningWeakCryptKey", resourceCulture); + } + } + + public static string WarningTooShortCryptKey { + get { + return ResourceManager.GetString("WarningTooShortCryptKey", resourceCulture); + } + } + + public static string WarningDefaultCryptKeyUsedForHashing { + get { + return ResourceManager.GetString("WarningDefaultCryptKeyUsedForHashing", resourceCulture); + } + } + + public static string WarningDefaultCryptKeyUsedForEncryption { + get { + return ResourceManager.GetString("WarningDefaultCryptKeyUsedForEncryption", resourceCulture); } } } diff --git a/ArchiSteamFarm/Localization/Strings.resx b/ArchiSteamFarm/Localization/Strings.resx index 8f04328f8..c20137927 100644 --- a/ArchiSteamFarm/Localization/Strings.resx +++ b/ArchiSteamFarm/Localization/Strings.resx @@ -711,4 +711,16 @@ Process uptime: {1} Your encryption key seems to be weak. Consider choosing a stronger one for increased security. Reason: {0} {0} will be replaced by the reason for the encryption key being considered weak + + Your encryption key is too short. We recommend to use one that is at least {0} bytes (characters) long. + {0} will be replaced by the number of bytes (characters) recommended + + + You're using {0} setting of {1} property, but you didn't provide a custom --cryptkey. You should provide a custom --cryptkey for increased security. + {0} will be replaced by the name of a particular setting (e.g. "SCrypt"), {1} will be replaced by the name of the property (e.g. "IPCPassword") + + + You're using {0} setting of {1} property, but you didn't provide a custom --cryptkey. This entirely defeats the protection, as ASF is forced to use its own (known) key. You should provide a custom --cryptkey for making use of the security benefit offered by this setting. + {0} will be replaced by the name of a particular setting (e.g. "AES"), {1} will be replaced by the name of the property (e.g. "SteamPassword") + diff --git a/ArchiSteamFarm/Program.cs b/ArchiSteamFarm/Program.cs index 022c398ea..16819300b 100644 --- a/ArchiSteamFarm/Program.cs +++ b/ArchiSteamFarm/Program.cs @@ -22,7 +22,6 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Collections.Immutable; using System.Diagnostics; using System.Globalization; using System.IO; @@ -47,8 +46,6 @@ using SteamKit2; namespace ArchiSteamFarm { internal static class Program { - private static readonly ImmutableHashSet ForbiddenCryptKeyPhrases = ImmutableHashSet.Create(StringComparer.InvariantCultureIgnoreCase, "crypt", "key", "cryptkey"); - internal static bool ConfigMigrate { get; private set; } = true; internal static bool ConfigWatch { get; private set; } = true; internal static string? NetworkGroup { get; private set; } @@ -102,16 +99,6 @@ namespace ArchiSteamFarm { throw new ArgumentNullException(nameof(cryptKey)); } - Utilities.InBackground( - () => { - (bool isWeak, string? reason) = Utilities.TestPasswordStrength(cryptKey, ForbiddenCryptKeyPhrases); - - if (isWeak) { - ASF.ArchiLogger.LogGenericWarning(string.Format(CultureInfo.CurrentCulture, Strings.WarningWeakCryptKey, reason)); - } - } - ); - ArchiCryptoHelper.SetEncryptionKey(cryptKey); } diff --git a/ArchiSteamFarm/Steam/Storage/BotConfig.cs b/ArchiSteamFarm/Steam/Storage/BotConfig.cs index 94126e222..b7492e3f4 100644 --- a/ArchiSteamFarm/Steam/Storage/BotConfig.cs +++ b/ArchiSteamFarm/Steam/Storage/BotConfig.cs @@ -598,6 +598,17 @@ namespace ArchiSteamFarm.Steam.Storage { ); } + switch (botConfig.PasswordFormat) { + case ArchiCryptoHelper.ECryptoMethod.AES when ArchiCryptoHelper.HasDefaultCryptKey: + ASF.ArchiLogger.LogGenericError(string.Format(CultureInfo.CurrentCulture, Strings.WarningDefaultCryptKeyUsedForEncryption, botConfig.PasswordFormat, nameof(SteamPassword))); + + break; + case ArchiCryptoHelper.ECryptoMethod.ProtectedDataForCurrentUser when ArchiCryptoHelper.HasDefaultCryptKey: + ASF.ArchiLogger.LogGenericWarning(string.Format(CultureInfo.CurrentCulture, Strings.WarningDefaultCryptKeyUsedForHashing, botConfig.PasswordFormat, nameof(SteamPassword))); + + break; + } + if (!Program.ConfigMigrate) { return (botConfig, null); } diff --git a/ArchiSteamFarm/Storage/GlobalConfig.cs b/ArchiSteamFarm/Storage/GlobalConfig.cs index 14bc493d4..7d4110b65 100644 --- a/ArchiSteamFarm/Storage/GlobalConfig.cs +++ b/ArchiSteamFarm/Storage/GlobalConfig.cs @@ -45,8 +45,6 @@ using SteamKit2; namespace ArchiSteamFarm.Storage { [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] public sealed class GlobalConfig { - private static readonly ImmutableHashSet ForbiddenIPCPasswordPhrases = ImmutableHashSet.Create(StringComparer.InvariantCultureIgnoreCase, "ipc", "api", "gui", "asf-ui", "asf-gui"); - [PublicAPI] public const bool DefaultAutoRestart = true; @@ -134,6 +132,8 @@ namespace ArchiSteamFarm.Storage { [PublicAPI] public static readonly ImmutableHashSet DefaultBlacklist = ImmutableHashSet.Empty; + private static readonly ImmutableHashSet ForbiddenIPCPasswordPhrases = ImmutableHashSet.Create(StringComparer.InvariantCultureIgnoreCase, "ipc", "api", "gui", "asf-ui", "asf-gui"); + [JsonIgnore] [PublicAPI] public WebProxy? WebProxy { @@ -506,16 +506,24 @@ namespace ArchiSteamFarm.Storage { return (null, null); } - if (globalConfig.IPCPasswordFormat == ArchiCryptoHelper.EHashingMethod.PlainText && !string.IsNullOrEmpty(globalConfig.IPCPassword)) { - Utilities.InBackground( - () => { - (bool isWeak, string? reason) = Utilities.TestPasswordStrength(globalConfig.IPCPassword!, ForbiddenIPCPasswordPhrases); + switch (globalConfig.IPCPasswordFormat) { + case ArchiCryptoHelper.EHashingMethod.PlainText when !string.IsNullOrEmpty(globalConfig.IPCPassword): + Utilities.InBackground( + () => { + (bool isWeak, string? reason) = Utilities.TestPasswordStrength(globalConfig.IPCPassword!, ForbiddenIPCPasswordPhrases); - if (isWeak) { - ASF.ArchiLogger.LogGenericWarning(string.Format(CultureInfo.CurrentCulture, Strings.WarningWeakIPCPassword, reason)); + if (isWeak) { + ASF.ArchiLogger.LogGenericWarning(string.Format(CultureInfo.CurrentCulture, Strings.WarningWeakIPCPassword, reason)); + } } - } - ); + ); + + break; + case ArchiCryptoHelper.EHashingMethod.Pbkdf2 when ArchiCryptoHelper.HasDefaultCryptKey: + case ArchiCryptoHelper.EHashingMethod.SCrypt when ArchiCryptoHelper.HasDefaultCryptKey: + ASF.ArchiLogger.LogGenericWarning(string.Format(CultureInfo.CurrentCulture, Strings.WarningDefaultCryptKeyUsedForHashing, globalConfig.IPCPasswordFormat, nameof(IPCPassword))); + + break; } if (!Program.ConfigMigrate) {