annotate win95kg.cpp @ 31:b5cf08125fd5

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