very simple console memory hack/trainer

Posts 1–8 of 8 · Page 1 of 1
very simple console memory hack/trainer
Code:
#include <iostream>
#include <windows.h>
#include <conio.h>
#include <string>

using namespace std;

int main()
{
	string response;
	cout << "		     gogogokitty199's   Point   Modifier\n";			//title at the top of program
	cout << " \n";
	cout << " \n";

	LPCWSTR Waw = L"Call of Duty®";				//name of game window, example(The Dead Linger)
	HWND hwnd = FindWindow(0, Waw);

	DWORD process_ID;
	GetWindowThreadProcessId(hwnd, &process_ID);
	HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, process_ID);
	
	while (true)			//program will reset here
	{
		cout << "What do you want to set your points as: ";
		int Points;
		cin >> Points;
		DWORD newdatasize = sizeof(Points);
		if (WriteProcessMemory(hProcess, (LPVOID)0x018EF124, &Points, newdatasize, NULL))			//change pointner
			cout << "point write success\n";
			cout << "  \n";
	}




}
looks good. Thanks for post.


-made a couple small changes


Output:

 
text copy of code

Code:
#include <iostream>
#include <windows.h>

using namespace std;

int main()
{
	HWND hwnd = 0; // handle to window of target process
	DWORD process_ID = 0; // target process's ID
	LPCWSTR Waw = L"Call of Duty®"; //title of game window, example(The Dead Linger)
	const DWORD pointsAddr = 0x018EF124; //static addr where 'points' are stored in target process.

	cout << "		     gogogokitty199's   Point   Modifier\n\n" << endl;
	while (true)
	{//Try find game window: will loop until window is found.
		hwnd = FindWindowW(0,Waw);
		if (!hwnd)
		{
			cout << "Game Window Not Open yet. Waiting 2 seconds..." << endl;
			Sleep(2000);
		}
		else
			break;
	}
	cout <<"Game Window Found. Handle: " << hwnd << endl;
	GetWindowThreadProcessId(hwnd, &process_ID); 	//Find processID (unknown thus far) based on the window handle
	HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, process_ID); 	//Try get handle from OpenProcess()
	if (hProcess)
	{//OpenProcess success
		cout <<"Process Opened OK. Handle: " << hProcess << endl;
		int Points = 0;
		while (true)
		{
			cout << "What do you want to set your points as: ";
			cin >> Points;
			if (WriteProcessMemory(hProcess, (LPVOID)pointsAddr, &Points, sizeof(Points), NULL))			//change value
				cout << "\npoint write success\n" << endl;
			else
			{
				cout <<"\npoint write FAIL! WriteProcessMemory() returned False.\n"
					 <<"Shutting down." << endl;
				system("PAUSE");
				return 1; // 1 indicates error, wpm failed.
			}
		}
	}
	else
	{//OpenProcess fail
		cout <<"Unable to access process. Maybe try running \"As Admin.\". OpenProcess() Failed.\n" 
			 <<"Shutting Down." << endl;
		system("PAUSE");
		return 1; // 1 indicates error
	}
	
	return 0; // can't occur
}
^^ edit: forgot to call CloseHandle() ...u got it.
Quote Originally Posted by abuckau907 View Post
looks good. Thanks for post.


-made a couple small changes


Output:

 
text copy of code

Code:
#include <iostream>
#include <windows.h>

using namespace std;

int main()
{
	HWND hwnd = 0; // handle to window of target process
	DWORD process_ID = 0; // target process's ID
	LPCWSTR Waw = L"Call of Duty®"; //title of game window, example(The Dead Linger)
	const DWORD pointsAddr = 0x018EF124; //static addr where 'points' are stored in target process.

	cout << "		     gogogokitty199's   Point   Modifier\n\n" << endl;
	while (true)
	{//Try find game window: will loop until window is found.
		hwnd = FindWindowW(0,Waw);
		if (!hwnd)
		{
			cout << "Game Window Not Open yet. Waiting 2 seconds..." << endl;
			Sleep(2000);
		}
		else
			break;
	}
	cout <<"Game Window Found. Handle: " << hwnd << endl;
	GetWindowThreadProcessId(hwnd, &process_ID); 	//Find processID (unknown thus far) based on the window handle
	HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, process_ID); 	//Try get handle from OpenProcess()
	if (hProcess)
	{//OpenProcess success
		cout <<"Process Opened OK. Handle: " << hProcess << endl;
		int Points = 0;
		while (true)
		{
			cout << "What do you want to set your points as: ";
			cin >> Points;
			if (WriteProcessMemory(hProcess, (LPVOID)pointsAddr, &Points, sizeof(Points), NULL))			//change value
				cout << "\npoint write success\n" << endl;
			else
			{
				cout <<"\npoint write FAIL! WriteProcessMemory() returned False.\n"
					 <<"Shutting down." << endl;
				system("PAUSE");
				return 1; // 1 indicates error, wpm failed.
			}
		}
	}
	else
	{//OpenProcess fail
		cout <<"Unable to access process. Maybe try running \"As Admin.\". OpenProcess() Failed.\n" 
			 <<"Shutting Down." << endl;
		system("PAUSE");
		return 1; // 1 indicates error
	}
	
	return 0; // can't occur
}
^^ edit: forgot to call CloseHandle() ...u got it.
You win lol
Can you compile that for me please?? add me on skype; erwwww9
Me? negative. not sending you the executable. (?)
Quote Originally Posted by abuckau907 View Post
Maybe try running \"As Admin.\"
Make another one with GetLastError()
Quote Originally Posted by Biesi View Post


Make another one with GetLastError()
That would be an improvement. Thnx.
more elobrate it
Posts 1–8 of 8 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?