Algorithm update

This commit is contained in:
Vichingo455 2023-03-31 14:55:24 +02:00 committed by GitHub
parent b5166281c2
commit 85f05db095
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 48 additions and 1 deletions

View File

@ -67,12 +67,59 @@ namespace Win95Keygen
year = "03"; year = "03";
} }
//Static numbers divisible by 7 //Static numbers divisible by 7
string divisibleby7 = "00007"; string divisibleby7 = RandomDivisibleBy7();
//Random numbers //Random numbers
rand = new Random(); rand = new Random();
int randomnumbers = rand.Next(10000,99999); int randomnumbers = rand.Next(10000,99999);
//Make the windows 95 key output //Make the windows 95 key output
return day.ToString() + year + "-OEM-" + "00" + divisibleby7 + "-" + randomnumbers.ToString(); 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;
}
} }
} }