1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| #include <iostream>
#include <string>
#include <cstdlib>
#include <ctime>
#ifdef __MINGW32__
#include <windows.h>
#endif
using namespace std;
int main(){
DWORD Target = 0x7FF6897C8B68;
DWORD bytes;
BYTE exampleBytes[77] = { 0x82, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
HWND hWnd;
while( !( hWnd = FindWindow( NULL, "Teste changement parametres match" ) ) )
Sleep( 100 );
DWORD PID;
while( !( GetWindowThreadProcessId( hWnd, &PID ) ) )
Sleep( 100 );
HANDLE hProcess;
while( !( hProcess = OpenProcess( PROCESS_VM_OPERATION | PROCESS_VM_READ | PROCESS_VM_WRITE, 0, PID ) ) )
Sleep( 100 );
WriteProcessMemory( hProcess, (PVOID)Target, exampleBytes, 77, &bytes );
system("pause");
return 0;
} |
Partager