Code:
#include <windows.h>
#include <iostream>
#include <random>
#include <time.h>
bool isKeyPresent = FALSE;
unsigned int inputKey;
int main(){
SetConsoleTitle("Crack_Me-MPGH v1 - by bkRy");
std::cout << "\t\t\tCrackeMe v1 by bkRy" << std::endl;
#pragma region math
int tempSerial;
srand(time(NULL));
//getting rand. values with <time.h>
unsigned int x = rand();
Sleep(30);
unsigned int z = (rand()) + x;
Sleep(30);
unsigned int y = (rand()) + x;
Sleep(30);
unsigned int multiX = 15;
Sleep(30);
//done getting rand. values, should be big enough to make a "good" key
unsigned int q = z*((x + y)*(x + y));
unsigned int p = x*((x - y)*(x - y));
unsigned int multi = y / multiX;
tempSerial = (((((q - p) + multi))*(x / 10)) / x); //all that should equal https://prntscr.com/d21km1
tempSerial += tempSerial;
if (tempSerial > 2){
isKeyPresent = TRUE;
}
else{goto end;} //prevent no key "cracks"
rtry: //could have placed the rtry on 45, but to prevent cracks lets put it up here
if (isKeyPresent == TRUE){
std::cout << "What is the Key?\n" << "Key: ";
std::cin >> inputKey;
if (inputKey == tempSerial){
std::cout << "\nCongratulations!\nPlease leave a 'thanks' on my profile if you enjoyed it!" << std::endl;
Sleep(5000);
goto end;
}if (inputKey != tempSerial){
std::cout << "Wrong key...\nTry again!" << std::endl;
Sleep(700);
system("cls");
std::cout << "\t\t\tCrackeMe v1 by bkRy" << std::endl;
goto rtry;
}
}
if (isKeyPresent == FALSE){goto end;} //prevent no key "cracks"
#pragma endregion
end:
return 0;
}