From 85f05db0954ca20b5c3be6311c18cf1755c0277e Mon Sep 17 00:00:00 2001 From: Vichingo455 <59311016+Vichingo455@users.noreply.github.com> Date: Fri, 31 Mar 2023 14:55:24 +0200 Subject: [PATCH] Algorithm update --- Win95Keygen/Form1.cs | 49 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/Win95Keygen/Form1.cs b/Win95Keygen/Form1.cs index 88be75e..e1b5314 100644 --- a/Win95Keygen/Form1.cs +++ b/Win95Keygen/Form1.cs @@ -67,12 +67,59 @@ namespace Win95Keygen year = "03"; } //Static numbers divisible by 7 - string divisibleby7 = "00007"; + string divisibleby7 = RandomDivisibleBy7(); //Random numbers rand = new Random(); int randomnumbers = rand.Next(10000,99999); //Make the windows 95 key output return day.ToString() + year + "-OEM-" + "00" + divisibleby7 + "-" + randomnumbers.ToString(); } + public static string RandomDivisibleBy7() + { + Random rand = new Random(); + int i = rand.Next(1,10); + string output = "31584"; //By fallback or else VS 2008 errors out + if (i == 1) + { + output = "31584"; + } + else if (i == 2) + { + output = "57778"; + } + else if (i == 3) + { + output = "67676"; + } + else if (i == 4) + { + output = "73787"; + } + else if (i == 5) + { + output = "88529"; + } + else if (i == 6) + { + output = "31724"; + } + else if (i == 7) + { + output = "39578"; + } + else if (i == 8) + { + output = "39207"; + } + else if (i == 9) + { + output = "93443"; + } + else if (i == 10) + { + output = "69167"; + } + return output; + } } }