Hello There, Guest! Login Register
Logo
Dismiss this notice
MaDLeeTs is not responsible for any attacks that are carried out on networks, websites or servers.
MaDLeeTs staff members cannot be held responsible.
All information on this forum is for educational purposes only.


Memory Hacking with C and CheatEngine, writing to Process Memory

  • 1 Vote(s) - 5 Average


07-27-2012, 01:11 PM #1
[email protected] Offline Respected *****
Respected
Posts:127 Threads:39 Joined:Jul 2012 Reputation: 0
Mood: Crazy
video :







Source Code
Quote:#include <iostream>

#include <windows.h>



// FindWindow();

// GetWindowThreadProcessId();

// OpenProcess();



// WriteProcessMemory();



// CloseHandle();



using namespace std;



int main()

{

int newValue = 500;



HWND hWnd = FindWindow(0, "Calculator");



if (hWnd == 0) {

cerr << "Cannot find window." << endl;

} else {

DWORD pId;

GetWindowThreadProcessId(hWnd, &pId);

HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pId);



if (!hProc) {

cerr << "Cannot open process." << endl;

} else {

int isSuccessful = WriteProcessMemory(hProc, (LPVOID)0x000AFCC4, &newValue, (DWORD)sizeof(newValue), NULL);



if (isSuccessful > 0) {

clog << "Process memory written." << endl;

} else {

cerr << "Cannot write process memory." << endl;

}



CloseHandle(hProc);

}

}



return 0;

}






Forum Jump:


Users browsing this thread:1 Guest(s)