Join Date: Jan 2012
Posts: 26
|
CPP Code: // triggerbot.cpp : Definiert den Einstiegspunkt für die Konsolenanwendung. // #include "stdafx.h" #include <iostream> #include <windows.h> #include <conio.h> #include <tlhelp32.h> using namespace std; DWORD dwPID = 0; HANDLE hProcess; DWORD m_dwAddress; DWORD dwClient_DLL; DWORD dwEngine_DLL; int m_iLookAtPlayer; int x; DWORD GetModuleBaseExtern( DWORD dwPID, char* szModuleName ); struct sGameWindow { HWND hWindow; }; sGameWindow GameWindow; int main() { cout << "Triggerbot" << endl << "by Santo" << endl << endl; while( !(GameWindow.hWindow = FindWindow(NULL, "Counter-Strike Source")) ) { Sleep(10); cout << "searching Counter-Strike Source"; } cout << "Counterstrike Source found " << endl; SetForegroundWindow( GameWindow.hWindow ); while( !( GetForegroundWindow() == GameWindow.hWindow ) ) { Sleep(10); } GetWindowThreadProcessId( GameWindow.hWindow, &dwPID ); while( !( hProcess = OpenProcess( PROCESS_ALL_ACCESS, false, dwPID ) ) ) { Sleep(10); } while( !( dwEngine_DLL = GetModuleBaseExtern( dwPID, "engine" ) ) ) { Sleep(10); } printf ( "[*] engine.dll [0x%.8X]\n", dwEngine_DLL ); while( !( dwClient_DLL = GetModuleBaseExtern( dwPID, "client" ) ) ) { Sleep(10); } printf ( "[*] client.dll [0x%.8X]\n", dwClient_DLL ); cout << "if client.dll is not 0x38000000 hack won't work" << endl; cout << "in this case please contact the coder" << endl; cout << "..." << endl; ReadProcessMemory( hProcess, (PVOID)( dwClient_DLL + 0x16Cb0968 ), &m_dwAddress, 4, NULL ); while( 1 == 1 ) { ReadProcessMemory( hProcess, (PVOID)( m_dwAddress + 0x1450 ), &m_iLookAtPlayer, 4, NULL ); printf ( "Look at: %u", m_iLookAtPlayer ); } cin >> x; return 0; } DWORD GetModuleBaseExtern( DWORD dwPID, char* szModuleName ) { HANDLE hModuleSnap = INVALID_HANDLE_VALUE; MODULEENTRY32 me32; hModuleSnap = CreateToolhelp32Snapshot( TH32CS_SNAPMODULE, dwPID ); if ( hModuleSnap == INVALID_HANDLE_VALUE ) return 0x0; me32.dwSize = sizeof( MODULEENTRY32 ); if ( !Module32First( hModuleSnap, &me32 ) ) { CloseHandle( hModuleSnap ); return 0x0; } do { if ( strstr( me32.szModule, szModuleName ) ) { CloseHandle( hModuleSnap ); return (DWORD)me32.modBaseAddr; } } while( Module32Next( hModuleSnap, &me32 ) ); CloseHandle( hModuleSnap ); return 0x0; }
Hat jemand ne Ahnung wieso ich immer den Wert 0 ausgegeben bekomme? Meine Addressen bzw Offsets stimmen! |