comparison win95kg.cpp @ 1:05978f04869b

Add files via upload committer: GitHub <noreply@github.com>
author Paper <37962225+mrpapersonic@users.noreply.github.com>
date Mon, 04 Jan 2021 13:52:42 -0500
parents
children fcbeb8097ad3
comparison
equal deleted inserted replaced
0:bfa16fc2d0a5 1:05978f04869b
1 /* Windows 95 Keygen - 11/24/20
2 By Paper
3 not sure if this will work fully, but from what i've seen it works well enough
4 */
5 #include <ctime>
6 #include <cstdlib>
7 #include <cstring>
8 #include <iomanip>
9 #include <iostream>
10 #include <string>
11
12 int a(), b(), c(), d(), e();
13 int main(int argc, char* argv[]){
14 int endpoint, startpoint, sadsong;
15 srand((unsigned) time(NULL));
16 if(argc>=2){
17 if (strcmp(argv[1], "--office") == 0){
18 startpoint = c();
19 sadsong = 4;
20 }
21 else if (strcmp(argv[1], "--oem") == 0){
22 int first = d(), third = e();
23 std::cout << std::setw(5) << std::setfill('0') << first;
24 std::cout << "-OEM-";
25 std::cout << std::setw(7) << std::setfill('0') << third << "-";
26 std::cout << std::setw(5) << std::setfill('0') << (rand() % 100000);
27 return 0;
28 }
29 else if (strcmp(argv[1], "--normal") == 0){
30 startpoint = a();
31 sadsong = 3;
32 }
33 else {
34 std::cout << "usage: " << argv[0] << " [--normal] [--oem] [--office]";
35 return 0;
36 }
37 }
38 else {
39 std::cout << "usage: " << argv[0] << " [--normal] [--oem] [--office]";
40 return 0;
41 }
42 endpoint = b();
43 std::cout << std::setw(sadsong) << std::setfill('0') << startpoint << "-";
44 std::cout << std::setw(7) << std::setfill('0') << endpoint;
45 return 0;
46 }
47 int a(){
48 int num;
49 num = rand() % 1000;
50 while ((num == 333) and (num == 444) and (num == 555) and (num == 666) and (num == 777) and (num == 888) and (num == 999)){
51 num = rand() % 1000;
52 }
53 while ((num % 3) != 0){
54 num=num+1;
55 }
56 return num;
57 }
58 int b(){
59 int first_digits = rand() % 10000000;
60 int last_digit = rand() % 10;
61 while ((last_digit == 0) || (last_digit >= 8)){
62 last_digit = rand() % 10;
63 }
64 std::string thisis = std::to_string(first_digits);
65 std::string veryfrustrating = std::to_string(last_digit);
66 std::string second_segment_p1 = (std::string(thisis) + std::string(veryfrustrating));
67 int second_segment = std::stoi(second_segment_p1);
68 while (second_segment % 7 != 0){
69 first_digits = rand() % 10000000;
70 last_digit = rand() % 10;
71 while ((last_digit == 0) || (last_digit >= 8)){
72 last_digit = rand() % 10;
73 }
74 std::string thisis = std::to_string(first_digits);
75 std::string veryfrustrating = std::to_string(last_digit);
76 std::string second_segment_p1 = (std::string(thisis) + std::string(veryfrustrating));
77 second_segment = std::stoi(second_segment_p1);
78 }
79 return second_segment;
80 }
81
82 int c(){
83 int new_site = rand() % 1000;
84 int ez_pwned = new_site % 10 + 1;
85 while (ez_pwned >= 10){
86 ez_pwned = ez_pwned - 10;
87 }
88 std::string thisisstill = std::to_string(new_site);
89 std::string prettyfrustrating = std::to_string(ez_pwned);
90 std::string iamsocool = (std::string(thisisstill) + std::string(prettyfrustrating));
91 int mysinusesareclogged = std::stoi(iamsocool);
92 return mysinusesareclogged;
93 }
94
95 int d(){
96 int day = (rand() % 366) + 1;
97 const char* years[] = {"95", "96", "97", "98", "99", "00", "01", "02", "03"};
98 int index = (rand() % 9);
99 const char* year = years[index];
100 std::string iamsotired = std::to_string(day);
101 std::string ofdoingthis = year;
102 std::string pleasehelp = (std::string(iamsotired) + std::string(ofdoingthis));
103 int ohmygod = std::stoi(pleasehelp);
104 return ohmygod;
105 }
106
107 int e(){
108 int first_digits = rand() % 1000000;
109 int last_digit = rand() % 10;
110 std::string thisis = std::to_string(first_digits);
111 std::string veryfrustrating = std::to_string(last_digit);
112 std::string second_segment_p1 = (std::string(thisis) + std::string(veryfrustrating));
113 int second_segment = std::stoi(second_segment_p1);
114 while (second_segment % 7 != 0){
115 first_digits = rand() % 10000000;
116 last_digit = rand() % 10;
117 std::string thisis = std::to_string(first_digits);
118 std::string veryfrustrating = std::to_string(last_digit);
119 std::string second_segment_p1 = (std::string(thisis) + std::string(veryfrustrating));
120 second_segment = std::stoi(second_segment_p1);
121 }
122 return second_segment;
123 }