Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // FirstHack.cpp : Defines the entry point for the console application.
- //
- #include "stdafx.h"
- #include <Windows.h>
- int _tmain(int argc, _TCHAR* argv[])
- {
- printf("Pacient Spider hacker.\n");
- HWND Proc = FindWindow(0, L"PaciΓͺncia Spider");
- if(Proc == 0) {
- printf("Error: Window not found\n");
- return 0;
- }
- printf("Game found: running\n");
- DWORD proc_Id;
- GetWindowThreadProcessId(Proc, &proc_Id);
- HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, proc_Id);
- if(!hProc) {
- printf("I couldn't open the process for hacking.\n");
- return 0;
- } else {
- printf("Process memory opened\n");
- }
- DWORD Pointer = 0x0012E1B8, Pointed;
- WORD Offset = 0x0014;
- int CurrentPoints = 0, newVal = 0;
- while(1) {
- int ACT;
- printf("1- View score\n2- Change score\n3- Exit");
- scanf("%d", &ACT);
- switch(ACT) {
- case 1:
- ReadProcessMemory(hProc, (LPCVOID)(Pointer), &Pointed, 4, NULL);
- ReadProcessMemory(hProc, (LPCVOID)(Pointed+Offset), &CurrentPoints, 4, NULL);
- printf("Score: %d\n", CurrentPoints);
- system("pause");
- break;
- case 2:
- ReadProcessMemory(hProc, (LPCVOID)(Pointer), &Pointed, 4, NULL);
- printf("Type the new value: ");
- scanf("%d", &newVal);
- WriteProcessMemory(hProc, (LPVOID)(Pointed+Offset), &newVal, (DWORD)sizeof(newVal), NULL);
- system("pause");
- break;
- case 3:
- exit(1);
- default:
- continue;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement