Mostly becausewon't exit the program... Try it with an actual exit function, like this, or just return from your main.Code:std::system("exit");
I'm trying to create a program that only works on 1 persons pc per login via grabbing the users machine guid and comparing it to one I've already set as the only "allowed" guid.
I currently have my own in there for testing purposes, but no matter how I try to write this, it always allows me to log in and continue through the rest of the program without closing when I change the digits of my mguid.
Does anyone know why it's not closing when it finds that the users (my) hwid isn't the same as the authed hwid given in "std::string frenchhwid"?
HW_PROFILE_INFO hwProfileInfo;
GetCurrentHwProfile(&hwProfileInfo);
wstring hwidString = hwProfileInfo.szHwProfileGuid;
string hwid(hwidString.begin(), hwidString.end());
std::string user;
std::string pass;
std::string hwids;
std::string frenchpass = "lol";
std::string frenchhwid = "dd07cef3-4ef5-4141-a8fb-5115def1f6e2";
std::vector<std::string> usernames{ "french" };
if (frenchhwid.compare(hwid) == 0);
if (frenchhwid != (hwid))
system("exit");
print("username: ");
std::getline(std::cin, user);
if (in_array(user, usernames)) {
system("cls"); //sorry non-windows users
if (user == "french") {
print("password: ");
std::getline(std::cin, pass);
if (pass == frenchpass)
Mostly becausewon't exit the program... Try it with an actual exit function, like this, or just return from your main.Code:std::system("exit");