This is simple base memory hacking for Counter-Strike 1.6
This is program edit value memory address.
First we need include library:
PHP Code:
#include <iostream>
#include <windows.h>
Next we need to find Windows name "Counter-Strike":
PHP Code:
HWND fenster = NULL;
while(fenster == NULL)
{
fenster = FindWindow (NULL, TEXT ("Counter-Strike"));
Sleep(100);
}
find protsesid by name prozoretsa:
PHP Code:
DWORD prozessid;
GetWindowThreadProcessId(fenster, &prozessid);
Open process and change the values of memory address:
PHP Code:
DWORD puffer = NULL;
int can = 250;
int cy=250,para=30000,mermi=900;
WriteProcessMemory(handleprozess, (LPVOID)0x01A17C78, &can, (DWORD)sizeof(can),NULL);//can // healt hack
WriteProcessMemory(handleprozess, (LPVOID)0x01A19544, &cy, (DWORD)sizeof(cy),NULL);//celik yelek // armour
WriteProcessMemory(handleprozess, (LPVOID)0x01A1B9FC, ¶, (DWORD)sizeof(para),NULL);//para // money
WriteProcessMemory(handleprozess, (LPVOID)0x01A16368, &mermi, (DWORD)sizeof(mermi),NULL);//mermi // ammo
This is full code:
PHP Code:
#include <iostream>
#include <windows.h>
using namespace std;
int main()
{
cout << "Test Hack" << endl << "Memory hacking" << endl;
HWND fenster = NULL;
while(fenster == NULL)
{
fenster = FindWindow (NULL, TEXT ("Counter-Strike"));
Sleep(100);
}
cout << "CS:S has been found!" << endl;
DWORD prozessid;
GetWindowThreadProcessId(fenster, &prozessid);
HANDLE handleprozess;
handleprozess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, prozessid);
Sleep(3000);
DWORD puffer = NULL;
int can = 250;
int cy=250,para=30000,mermi=900;
WriteProcessMemory(handleprozess, (LPVOID)0x01A17C78, &can, (DWORD)sizeof(can),NULL);//can // healt hack
WriteProcessMemory(handleprozess, (LPVOID)0x01A19544, &cy, (DWORD)sizeof(cy),NULL);//celik yelek // armour
WriteProcessMemory(handleprozess, (LPVOID)0x01A1B9FC, ¶, (DWORD)sizeof(para),NULL);//para // money
WriteProcessMemory(handleprozess, (LPVOID)0x01A16368, &mermi, (DWORD)sizeof(mermi),NULL);//mermi // ammo
CloseHandle(handleprozess); return 0;
}
I hope I was helpful.