diff --git a/unlocker/Program.cs b/unlocker/Program.cs index f6b1b6e..4fbc0a5 100644 --- a/unlocker/Program.cs +++ b/unlocker/Program.cs @@ -20,13 +20,13 @@ public static class Program "kms8.MSGuides.com", "kms9.MSGuides.com", }; - public static readonly (string[] parts, string serial) KEY = (new[] - { + public static readonly string KEY_SERIAL = "XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99"; + public static readonly string[] KEY_PARTS = { "WFG99", "DRTFM", "BTDRB", "CPQVG" - }, "XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99"); + }; public static void Main() { @@ -87,7 +87,7 @@ _ _ _ __ | | ___ __ _____ ___ __ / /_ / /_| ___| / /_ Console.WriteLine("KMS Script location: " + ospp.FullName); } - (int exit, string stdout) exec_ospp(string args) + Tuple exec_ospp(string args) { using (Process proc = new Process { @@ -126,7 +126,7 @@ _ _ _ __ | | ___ __ _____ ___ __ / /_ / /_| ___| / /_ Console.WriteLine(stderr); } - return (proc.ExitCode, stdout); + return new Tuple(proc.ExitCode, stdout); } } DirectoryInfo licencedir = new DirectoryInfo($"{ospp.Directory.FullName}/../root/Licenses16"); @@ -140,18 +140,18 @@ _ _ _ __ | | ___ __ _____ ___ __ / /_ / /_| ___| / /_ Console.ForegroundColor = ConsoleColor.Gray; Console.WriteLine("Activating Microsoft Office ..."); - foreach (string part in KEY.parts) + foreach (string part in KEY_PARTS) exec_ospp($"/unpkey:{part}"); - exec_ospp($"/inpkey:{KEY.serial}"); + exec_ospp($"/inpkey:{KEY_SERIAL}"); foreach (string server in KMS_SERVERS) { exec_ospp($"/sethst:{server}"); - (_, string result) = exec_ospp("/act"); + Tuple result = exec_ospp("/act"); - if (result.ToLower().Contains("successful")) + if (result.Item2.ToLower().Contains("successful")) { activated = true; diff --git a/unlocker/unlocker.csproj b/unlocker/unlocker.csproj index e24fcbf..f2b9c81 100644 --- a/unlocker/unlocker.csproj +++ b/unlocker/unlocker.csproj @@ -1,6 +1,6 @@ - + Exe - netstandard2.0 + net461