مولد مفاتيح للبرنامج
#include <iostream>
#include <sstream>
#include <iomanip>
std::string encrypttoken(std::string str) {
unsigned short key = 0, _secret = 0x9EE;
int _length = str.size();
std::ostringstream result;
for (int i = 0; i < _length; i++) {
str[i] = key = str[i] ^ (_secret >> 8);
result << std::hex << std::setfill('0') << std::setw(2) << key;
_secret = key = (_secret + key) * 0xD201 + 0x7F6A;
}
return result.str();
}
int main() {
std::cout << "\tMtk_Auth_Oneclick_V3.3 KeyGen\n" <<
" \tBy EarthMan123 - AT4RE TEAM\n" << std::endl;
std::string name, hardwareid, serial = "";
std::cout << "Desired name: ";
std::getline(std::cin, name);
name = "AT4RE-" + name;
std::cout << "HardwareID: ";
std::cin >> hardwareid;
unsigned short namelen = name.size();
serial = hardwareid + name[0];
if (namelen >= 4) {
serial += name[3];
if (namelen >= 6) {
serial += name[5];
if (namelen >= 10) {
serial += name[9];
}
}
}
std::cout << "\n\n\n<<< Registration Information >>>\n";
std::cout << "==> UserID: " << name << std::endl;
std::cout << "==> Serial: " << encrypttoken(serial) << std::endl;
std::cout << "********************************\n";
system("pause");
return 0;
}
من طلب العلا ... سهر الليالي