Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ktoś mi pomoże rozwiązać problem
#1
Okej, więc to jest mój hack, ale kiedy klikam i przytrzymam lewe kliknięcie, hack nie działa, to jest kod ...       Kod:   #include "stdafx.h" #include <Windows.h> #include "detours.h" #include <Mmsystem.h> #pragma comment (lib, "winmm.lib") HANDLE WorkerThread; DWORD WINAPI GetTickCount_Detour (void); DWORD WINAPI timeGetTime_Detour (void); BOOL WINAPI QueryPerformanceCounter_Detour (LARGE_INTEGER * lp); // skonfiguruj nasze trampoliny DETOUR_TRAMPOLINE (DWORD WINAPI GetTickCount_Trampoline (void), GetTickCount); DETOUR_TRAMPOLINE (DWORD WINAPI timeGetTime_Trampoline (void), timeGetTime); DETOUR_TRAMPOLINE (BOOL WINAPI QueryPerformanceCounter_Trampoline (LARGE_INTEGER * lp), QueryPerformanceCounter); // zmienne globalne dla QueryPerformanceCounter hook DWORD qpc_last_fake, qpc_last_real; // zmienne globalne dla haka TimeGetTime DWORD tgt_last_real, tgt_last_fake; // zmienne globalne dla haka GetTickCount DWORD gtc_last_real, gtc_last_fake; DWORD increasefactor = 200; bool MouseIsDown = false; bool ThreadIsRunning = true; bool Speed = false; / ** * Niski poziom oddzwaniania myszy * / LRESULT CALLBACK MouseCallback (int nCode, WPARAM wParam, LPARAM lParam) {/ ** * Haczyk myszy niskiego poziomu * / SetWindowsHookEx (WH_MOUSE_LL, reinterpret_cast <HOOKPROC> (MouseCallback), NULL, ZERO ); if (nCode == HC_ACTION) {switch (wParam) {case WM_LBUTTONDOWN: MouseIsDown = true; złamać ; case WM_LBUTTONUP: MouseIsDown = false; złamać ; }} return CallNextHookEx (NULL, nCode, wParam, lParam); } Wątek DWORD WINAPI (paragon LPVOID) {while (ThreadIsRunning) {if (MouseIsDown = true) {Speed = true; } if (MouseIsDown = false) {Speed = false; }} Return ERROR_SUCCESS; } DWORD WINAPI GetTickCount_Detour () {DWORD ret = GetTickCount_Trampoline (); DWORD nReal = ret; DWORD dReal = nReal - gtc_last_real; DWORD dFake = (increasefactor / 100) * dReal; if (Speed) {ret = gtc_last_fake + dFake; gtc_last_fake + = dFake; } else {ret = gtc_last_fake + dReal; gtc_last_fake + = dReal; } Gtc_last_real + = dReal; return ret; } DWORD WINAPI timeGetTime_Detour () {DWORD ret = timeGetTime_Trampoline (); DWORD nReal = ret; DWORD dReal = nReal - tgt_last_real; DWORD dFake = (increasefactor / 100) * dReal; if (Speed) {ret = tgt_last_fake + dFake; tgt_last_fake + = dFake; } else {ret = tgt_last_fake + dReal; tgt_last_fake + = dReal; } Tgt_last_real + = dReal; return ret; } BOOL WINAPI QueryPerformanceCounter_Detour (LARGE_INTEGER * lp) {BOOL ret = QueryPerformanceCounter_Trampoline (lp); DWORD nReal = lp -> LowPart; DWORD dReal = nReal - qpc_last_real; DWORD dFake = (increasefactor / 100) * dReal; if (Speed) {lp -> LowPart = qpc_last_fake + dFake; qpc_last_fake + = dFake; } else {lp -> LowPart = qpc_last_fake + dReal; qpc_last_fake + = dReal; } gtc_last_real + = dReal; return ret; } BOOL WINAPI DllMain (HINSTANCE hinstModule, DWORD dwReason, LPVOID lpvReserved) {if (dwReason == DLL_PROCESS_ATTACH) {DetourFunctionWithTrampoline ((PBYTE) GetTickCount_Trampoline, (PBYTE) GetTickCount_Detour); DetourFunctionWithTrampoline ((PBYTE) timeGetTime_Trampoline, (PBYTE) timeGetTime_Detour); DetourFunctionWithTrampoline ((PBYTE) QueryPerformanceCounter_Trampoline, (PBYTE) QueryPerformanceCounter_Detour); CreateThread (NULL, 4096, Wątek, NULL, 0, NULL); return true; } return false; }     To szybkie włamanie do gry FPS .... Wiem, że kod był do dupy ..
Reply
#2
Copypasta dużo? Jeśli potrafisz wyjaśnić, co ten kod wykonuje w kilku zdaniach, będziesz mógł to naprawić samodzielnie.
Reply




Users browsing this thread: 1 Guest(s)