Friday, December 30, 2011

NEW DOMAIN!

track9studioz.com is up , its still in dev states but the forums will be up and running. Everything new will be posted there , i might post update information on this blog , or let it dies off .

Monday, December 19, 2011

Mic plan

WEll in all my videos ive been using onscreen text instead of a mic , due to my 3 pairs of logitech headsets crapping out. but i got a great idea that i shouldve thought of before , why not use my phone to record audio while im doing the video? then i can just drag in the clip to camtasia and line it up and bam, got commentary in my vids. which is what im going to do.

Sunday, December 18, 2011

New GameHacking series , using Terraria as its Target.


Just uploaded the first video in what im planning to be a pretty extensive and hopefully interesting gamehacking series.

Heres a link to the FIRST video. - Infinite Ammo/Items.
Just uploaded the SECOND video! - Saving Your Hacks for Later Use.

enjoy.

Friday, December 16, 2011

Tutorial - c++ - Making a Game Trainer

Ok this is a moderately advanced tutorial on how to change the value of an address with a hot-key press.

im going to use readProcessMemory to read the current value and then writeProcessMemory to write whatever value i want to it. reading the value first is useful because you can add/subtract a certain value to the current value.

things your going to need before you can start.
-address of the value you want to change ( if its a pointer then you need the offsets as well, im not going to show how to do that in the tutorial , but if its requested then i will).
-Willpower or Coffee :D

----START-----
ok open up your IDE and create a new project, im using VS 2008

press "OK" , then on the next window press "Next" , not finish. and you will get to the Application settings window, make your settings look like this and click "Finish".


right click the "Source Files" folder and goto add>New Item.

in the window that pop choose .cpp file and name it Main.

then add the following code to Main.

#include <iostream>
#include <windows.h> 
using namespace std; 
int main()
{
return 0;
}
all of this should be very familiar if you did the previous tutorials.

and now we add some code to our program and it looks like this.
#include <iostream> #include <windows.h>using namespace std;
void Write();int main() { int hKey = VK_NUMPAD0; cout<<"Plants Vs Zombies trainer , Num 0 to add 500 sunpoints"<< endl;
while(1){
if(GetAsyncKeyState(hKey)==-32768) { Write(); Sleep(75); system ("pause"); return 0;}
ok now to step through some things.

void Write();
all this is doing is telling the compiler that later on there will be a function called Write() , so i can use it in main without an error saying " 'Write': identifier not found".

cout<<"Plants Vs Zombies trainer , Num 0 to add 500 sunpoints"<< endl;
while(1)
{
here im outputting a little info about the trainer , like the hotkey and what will change.
i forgot to mention that im using Plants Vs Zombies because its an easy game to hack and easily found (torrents). and im starting an infinite while loop(to check for the Num 0 key press).

if(GetAsyncKeyState(VK_NUMPAD0)==-32768) { Write(); } Sleep(75); }

here i'm using an IF statement to check if Numpad 0 is down,
and if it is then to execute the Write function (which we haven't written yet).
then im "Sleeping" for 75 ms so the cpu isnt running at 50% load, and an ending curlybrace to end the while loop.

now this is what the Write function looks like (it does the actual reading and writing)

void Write()
{
DWORD address = 0x0F6495E0;
int valueAtAddress = 0;
HANDLE hProcess = 0; HWND hWindow;
DWORD pid = 0;
hWindow = FindWindow(NULL, L"Plants vs. Zombies");

if (hWindow) {
cout<<"window found"<<endl; GetWindowThreadProcessId(hWindow, &pid);
}
hProcess = OpenProcess(PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_VM_OPERATION | PROCESS_QUERY_INFORMATION, 0, pid); VirtualProtectEx(hProcess, (LPVOID)address, 256, PAGE_EXECUTE_READWRITE, NULL);

ReadProcessMemory(hProcess,(LPCVOID)address,&valueAtAddress,sizeof(valueAtAddress),NULL);
cout << "the current sunpoint value is " << valueAtAddress << endl;
DWORD value = valueAtAddress + 500; WriteProcessMemory(hProcess,(LPVOID)address,&value,sizeof(value),NULL);
CloseHandle(hProcess);
}
ok

DWORD address = 0x0F6495E0;
int valueAtAddress = 0;
HANDLE hProcess = 0; HWND hWindow;
DWORD pid = 0;
only thing you really have to worry about here is the "address" , because it holds the address of the value you want to change, and its in Hex(0xthenyouraddress). the rest of the code im just declaring a handle ,windowhandle, and a variable to hold the processID.

hWindow = FindWindow(NULL, L"Plants vs. Zombies");
if (hWindow) { cout<<"window found"<<endl; GetWindowThreadProcessId(hWindow, &pid); }

first im using "FindWindow()" to get the window handle of the game , you have to put the window title inbetween the quotes.

then im using an IF statement to check if a window handle was assigned and if it was then im outputing "window found" and using the function GetWindowThreadProcessId() to get the processID (assigned to pid).

hProcess = OpenProcess(PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_VM_OPERATION | PROCESS_QUERY_INFORMATION, 0, pid); VirtualProtectEx(hProcess, (LPVOID)address, 256, PAGE_EXECUTE_READWRITE, NULL);

ReadProcessMemory(hProcess,(LPCVOID)address,&valueAtAddress,sizeof(valueAtAddress),NULL);
cout << "the current sunpoint value is " << valueAtAddress << endl;
DWORD value = valueAtAddress + 500; WriteProcessMemory(hProcess,(LPVOID)address,&value,sizeof(value),NULL);
CloseHandle(hProcess);
}
first thing im doing here is using the function "OpenProcess()" to get the process handle
then im using "VirtualProtectEx()" to give me read write permissions (should only be needed for vista).
next im using "ReadProcessMemory()" to read the value at our specified address and storing that value in "valueAtAddress", i output the current value before the change.
after that i declare the dword variable named value and assign it the current value (that we got from readprocessmemory) stored at the address specified and add 500 to it.
then using "WriteProcessMemory()" i write that value (Dword value) into the address.
and its always good to avoid memory leaks so i close my handle.

and that is it , if you run your program it should look like this.

and here is the complete code, also the address i used isnt static so you cant use it (i plan on making a tutorial for this later)



what your code should look like all together. if you have any questions or errors post in the chat .

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

using namespace std;

void Write();
int main()
{
cout<<"Plants Vs Zombies trainer , Num 0 to add 500 sunpoints"<< endl; 
while(1) 
if(GetAsyncKeyState(VK_NUMPAD0)==-32768) {
Write(); 
}
 Sleep(75); 
return 0;
}

void Write()
{
DWORD address = 0x0F6495E0;
int valueAtAddress = 0;
HANDLE hProcess = 0; HWND hWindow;
DWORD pid = 0;
hWindow = FindWindow(NULL, L"Plants vs. Zombies");

if (hWindow) {
cout<<"window found"<<endl; GetWindowThreadProcessId(hWindow, &pid);
}

hProcess = OpenProcess(PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_VM_OPERATION | PROCESS_QUERY_INFORMATION, 0, pid); VirtualProtectEx(hProcess, (LPVOID)address, 256, PAGE_EXECUTE_READWRITE, NULL);

ReadProcessMemory(hProcess,(LPCVOID)address,&valueAtAddress,sizeof(valueAtAddress),NULL);
cout << "the current sunpoint value is " << valueAtAddress << endl;
DWORD value = valueAtAddress + 500;
WriteProcessMemory(hProcess,(LPVOID)address,&value,sizeof(value),NULL);
CloseHandle(hProcess);
}

Tuesday, December 13, 2011

Blogspot problem

The things i posted dont really fit on a blog site , mainly cause they are tutorials and have code posted , which looks much better with code tags and other things blogspot doesnt offer .

so when certain things come through expect to see all these tutorials (and more!) how they are supposed to look, on track9studioz.com .