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