#include <windows.h>
#include <filesystem>
int main()
{
HWND hwnd = FindWindow(NULL, "Warface");
if (hwnd != NULL)
{
HWND hwnd = FindWindow(NULL, "Warface");
if (hwnd == NULL) { MessageBox(0, "[S] Не нашел Игру [ Not found game ]", "Error", 0); exit(0); }
DWORD pid = NULL;
DWORD tid = GetWindowThreadProcessId(hwnd, &pid);
if (tid == NULL) { MessageBox(0, "[S] Не нашел Игру [ Not found game ]", "Error", 0); exit(0); }
for (int i = 5; i >= 1; i--)
{
printf("%i\n", i);
if (i == 1) { printf("[S] Инжект [ Inject ]\n"); }
Sleep(1000);
}
char* namedll = new char;
wsprintfA(namedll, "%s%s", "пусть до dll", dllname(numbercheat).c_str());
HMODULE dll = LoadLibraryEx(namedll, NULL, DONT_RESOLVE_DLL_REFERENCES);
if (dll == NULL) {
MessageBox(0, "[S] Ошибка инжекта [ Error inject ]", "", 0);
exit(0);
}
HOOKPROC addr = (HOOKPROC)GetProcAddress;
if (addr == NULL) {
MessageBox(0, "[S] Error 0x2", "", 0);
exit(0);
}
HHOOK handle = SetWindowsHookEx(WH_GETMESSAGE, addr, dll, tid);
if (handle == NULL) {
MessageBox(0, "[S] Не нашел Игру [ No game ]", "", 0);
exit(0);
}
if (PostThreadMessage(tid, WM_NULL, NULL, NULL))
{
ShowWindow(GetConsoleWindow(), SW_HIDE);
int result;
char oldname[] = "dll";
char newname[] = "dll";
result = rename(oldname, newname);
int number = numbercheat;
while (true)
{
/* Пороверка на игру */
printf("Проверка на игру\n");
Sleep(1000);
HWND wf = FindWindow(NULL, "Warface");
if (wf == NULL)
{
ExitProcess(0);
}
/* Пороверка на игру */
printf("Все ок\n");
Sleep(10000);
}
}
}
else printf(xor_a("[S] Start the game first \n"));
}
else printf("Close....\n");
}