Compare commits

...

10 Commits

Author SHA1 Message Date
Vichingo455 b1a264b023
v1.3
- Updated algorithm, more readable
2023-04-03 21:04:27 +02:00
Vichingo455 0634dfa030
Update README.md 2023-04-03 11:35:25 +02:00
Vichingo455 d74388a7fe
Update README.md 2023-04-03 11:29:54 +02:00
Vichingo455 b0644a50bd
v1.2
Improved algorithm, centered the window
2023-04-01 15:52:29 +02:00
Vichingo455 b1cba60440
Merge pull request #1 from Bang1338/patch-1
better random and algo
2023-04-01 15:39:50 +02:00
Bang1338 b5f2d8ba9b
better random and algo
1. don't use "Yandere Dev" method. https://www.c-sharpcorner.com/article/how-to-select-a-random-string-from-an-array-of-strings/
2. 001 to 366 also valid.
3. Use "0XXXXXX" instead of "00XXXXX" (lazy)

Extra: use VB2010 and set .NET Framework to 3.5 or 2
2023-04-01 20:36:42 +07:00
Vichingo455 62a058535c
Bugfix 2023-03-31 15:21:29 +02:00
Vichingo455 c557aca9b4
v1.1 2023-03-31 14:58:27 +02:00
Vichingo455 7285885a3b
Update README.md 2023-03-31 14:57:26 +02:00
Vichingo455 a195213fe2
Copyright in license 2023-03-31 14:56:21 +02:00
4 changed files with 20 additions and 88 deletions

View File

@ -629,8 +629,8 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
Windows 95 OEM Key Generator
Copyright (C) 2023 Vichingo455
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published

View File

@ -5,6 +5,9 @@ We implemented it in this little tool which is also easy to use.
## Usage
Using this tool is easy, just run it and press the "Generate" button to enjoy a Windows 95 key.
![image](https://user-images.githubusercontent.com/59311016/229126177-29e59d13-553c-41fc-96b6-0f1f806e4aee.png)
If you don't want to download the keygen, you can use the online version [here](https://replit.com/@Vichingo455/Windows-95-Keygen?v=1)
## Compiling
Compiling this tool is not so difficult. Here's how.

View File

@ -22,103 +22,32 @@ namespace Win95Keygen
}
private static string GenerateKey()
{
//Generate day from 100 to 365
//Generate day from 100 to 366
Random rand;
rand = new Random();
int day = rand.Next(100,365);
int day = rand.Next(100, 366);
//Generate year
rand = new Random();
int i = rand.Next(1,9);
string year = "95";
if (i == 1)
{
year = "95";
}
else if (i == 2)
{
year = "96";
}
else if (i == 3)
{
year = "97";
}
else if (i == 4)
{
year = "98";
}
else if (i == 5)
{
year = "99";
}
else if (i == 6)
{
year = "00";
}
else if (i == 7)
{
year = "01";
}
else if (i == 8)
{
year = "02";
}
else if (i == 9)
{
year = "03";
}
string[] yeararray = { "95", "96", "97", "98", "99", "00", "01", "02", "03" };
int index = rand.Next(yeararray.Length);
string year = yeararray[index];
//Static numbers divisible by 7
string divisibleby7 = RandomDivisibleBy7();
//Random numbers
rand = new Random();
int randomnumbers = rand.Next(10000,99999);
int randomnumbers = rand.Next(10000, 99999);
//Make the windows 95 key output
//TODO: Use "0XXXXXX" instead of "00XXXXX"
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";
}
string[] yeararray = { "31584", "39207", "77777", "13811", "97408", "65908", "34421", "96526", "82121" };
int index = rand.Next(yeararray.Length);
string output = yeararray[index];
return output;
}
}

View File

@ -33,6 +33,6 @@ using System.Resources;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.3.0.0")]
[assembly: AssemblyFileVersion("1.3.0.0")]
[assembly: NeutralResourcesLanguageAttribute("en")]