-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHwid.io.cpp
More file actions
195 lines (169 loc) · 5.02 KB
/
Copy pathHwid.io.cpp
File metadata and controls
195 lines (169 loc) · 5.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
// Hwid.io.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <windows.h>
#include <stdio.h>
#include <windows.h>
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <windows.h>
#include <urlmon.h>
#include <wininet.h>
#include <strsafe.h>
#include <conio.h>
#include <iosfwd>
#include "print.h"
#include <Windows.h>
#include <iostream>
#include <string>
#include <conio.h>
#include <cstdlib>
#include <stdlib.h>
#include <dwrite.h>
#include <urlmon.h>
#include "loader.h"
#pragma comment(lib, "Wininet.lib")
#pragma comment(lib, "urlmon.lib")
#define StrW VMProtectDecryptStringW
#define StrA VMProtectDecryptStringA
#include "print.h"
#include <filesystem>
#include <string>
#include <Windows.h>
#include <iostream>
#include <string>
#include <conio.h>
#include <cstdlib>
#include <stdlib.h>
#include <ostream>
#include <regex>
#include <filesystem>
#include <istream>
#include <cstdio>
#include <string>
#include <tchar.h>
#include <random>
using namespace std;
using namespace std::filesystem;
class Color
{
public:
Color(int desiredColor) {
consoleHandle = GetStdHandle(STD_OUTPUT_HANDLE);
color = desiredColor;
}
friend std::ostream& operator<<(std::ostream& ss, Color obj) {
SetConsoleTextAttribute(obj.consoleHandle, obj.color);
return ss;
}
private:
int color;
HANDLE consoleHandle;
/*
0 = black
1 = blue
2 = green
3 = light blue
4 = red
5 = purple
6 = gold
7 = white
*/
};
HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
namespace GlobalItems
{
enum LicenseStates
{
LICENSE_AVERAGE = 0,
LICENSE_UNEXPECTED,
LICENSE_EXPIRED
};
}
// yeah
int confirmLicone()
{
VMProtectBeginUltra("licensingFn");
std::ifstream inFile;
inFile.open(StrA("C:\\ProgramData\\Saved.Key"));
if (!inFile) {
//std::cout << StrA("Error : 1\n");
return GlobalItems::LicenseStates::LICENSE_UNEXPECTED;
}
if (inFile.is_open())
{
std::string line;
getline(inFile, line);
inFile.close();
char serial[1024]; serial[0] = 0;
int lic = VMProtectActivateLicense(line.c_str(), serial, sizeof(serial));
int res = VMProtectSetSerialNumber(serial);
if (!lic && !res)
{
printf(StrA("License Accepted!\n"));
Sleep(700); system("cls"); return GlobalItems::LicenseStates::LICENSE_AVERAGE; // ok
}
else
{
HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
}
}
else
{
//std::cout << StrA("error : 1");
return GlobalItems::LicenseStates::LICENSE_UNEXPECTED;
//printf(StrA("[+] License invalid!\n"));
Sleep(700);
}
return GlobalItems::LicenseStates::LICENSE_AVERAGE; // ok
VMProtectEnd();
}
void ConfirmLicense()
{
VMProtectBeginUltra("ConfirmLicenseFn");
VMProtectEnd();
}
void printlogo()
{
system("cls");
std::cout << Color(6) << R"(
_| _| _| _| _|_|_| _|_|_| _|_| _|_|_|_|_| _|_|_|_| _|_|_| _|_|_|_|_|
_| _| _|_| _|_| _| _| _| _| _| _| _| _| _| _|
_| _| _| _| _| _|_|_| _|_|_| _| _| _| _|_|_| _| _|
_| _| _| _| _| _| _| _| _| _| _| _| _|
_| _| _| _| _| _| _|_| _| _|_|_|_| _|_|_| _|
)";
std::cout << "\n";
}
void Licensing()
{
std::string choice;
auto retn = confirmLicone();
if (retn == GlobalItems::LicenseStates::LICENSE_AVERAGE)
{
ConfirmLicense();
print::set_text("[1] Example \n", LightGray);
std::getline(std::cin, choice);
if (choice == "1")
{
system("CLS");
}
std::getline(std::cin, choice);
}
else
{
std::cout << StrA("[+] Enter your key: "); SetConsoleTextAttribute(hStdOut, 11);
std::string keyInput;
std::cin >> keyInput;
std::ofstream myfile("C:\\ProgramData\\Saved.Key");
myfile << keyInput;
myfile.close();
system("cls");
Licensing();
}
}
int main()
{
printlogo();
Licensing();
}