diff --git a/PotatoNV-next/Core.cs b/PotatoNV-next/Core.cs index 19228c7..de3edf8 100644 --- a/PotatoNV-next/Core.cs +++ b/PotatoNV-next/Core.cs @@ -104,12 +104,12 @@ private void ReadInfo() if (factoryKey != null) { - Log.Info($"Unlock key: {factoryKey}"); + Log.Info($"Saved key: {factoryKey}"); } var random = new Random(Guid.NewGuid().GetHashCode()); - args.UnlockCode = factoryKey ?? new string(Enumerable.Repeat("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", 16) + args.UnlockCode = new string(Enumerable.Repeat("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", 16) .Select(s => s[random.Next(s.Length)]).ToArray()); } @@ -160,7 +160,7 @@ private void SetHWDogState(byte state) private string ReadFactoryKey() { var res = fb.Command("getvar:nve:WVLOCK"); - var match = Regex.Match(res.Payload, @"\w{16}"); + var match = Regex.Match(res.Payload, @"[\w\d]{16}"); return match.Success ? match.Value : null; } @@ -213,16 +213,13 @@ private void Worker_DoWork(object sender, DoWorkEventArgs e) ReadInfo(); WriteNVME(); - Log.Info("Finalizing..."); - LogResponse(fb.Command($"oem unlock {args.UnlockCode}")); - if (args.Reboot) { Log.Info("Rebooting..."); fb.Command("reboot"); } - Log.Info($"Bootloader unlock code: {args.UnlockCode}"); + Log.Info($"New unlock code: {args.UnlockCode}"); fb.Disconnect(); } diff --git a/PotatoNV-next/Properties/AssemblyInfo.cs b/PotatoNV-next/Properties/AssemblyInfo.cs index 1c1c679..69d5da3 100644 --- a/PotatoNV-next/Properties/AssemblyInfo.cs +++ b/PotatoNV-next/Properties/AssemblyInfo.cs @@ -20,5 +20,5 @@ ResourceDictionaryLocation.SourceAssembly )] -[assembly: AssemblyVersion("2.2.0.0")] -[assembly: AssemblyFileVersion("2.2.0.0")] +[assembly: AssemblyVersion("2.2.1.0")] +[assembly: AssemblyFileVersion("2.2.1.0")]