ROHAN2 WORLD 1-120 TR TİPİ OFFICIAL YOHARA, BALATHOR VE AMON! 80. GÜNÜNDE! +10.000 ONLİNE! HİLE VE BOT %100 ENGELLİ HEMEN TIKLA!
Userinterface.cpp
#include <fstream>
#include <string>
#include <shellapi.h>
#include <regex>
#include <thread>
#include <chrono>
#include <windows.h>
std::vector<std::string> windowBlackList = {
"inject",
"lalaker",
"hlbot",
"eterwizard",
"etermgr",
"m2bob",
"netlimiter",
"metin2mod",
"wireshark",
"unpack",
"clicker",
"debugger",
"Wiersz polecenia",
"ymir work",
"stmod",
"hlb0t",
"metin2 bot",
"m24pro"
};
static BOOL CALLBACK FindBlacklistWindow(HWND hWnd, LPARAM lparam)
{
int length = GetWindowTextLength(hWnd);
char* buffer = new char[length + 1];
GetWindowTextA(hWnd, buffer, length + 1);
std::string windowTitle(buffer);
if (IsWindowVisible(hWnd) && length != 0)
{
for (const auto& blacklisted : windowBlackList)
{
if (std::regex_search(windowTitle, std::regex(blacklisted, std::regex_constants::icase)))
{
std::ofstream textfile("protection.txt", std::ios::out | std::ios::app);
textfile << "Protection Alert: Suspicious activity detected. Client terminated." << std::endl;
ShellExecuteA(NULL, "open", "protection.txt", NULL, NULL, SW_SHOWNORMAL);
TerminateProcess(GetCurrentProcess(), 0);
exit(0);
}
}
}
delete[] buffer;
return TRUE;
}
void ScanForBlockedWindows()
{
while(true)
{
EnumWindows(FindBlacklistWindow, NULL);
std::this_thread::sleep_for(std::chrono::milliseconds(200));
}
}
void Protection()
{
CreateThread(NULL, NULL, LPTHREAD_START_ROUTINE(ScanForBlockedWindows), NULL, NULL, 0);
}
////////////////////////
Find:
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
Add after:
Protection();