 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
gogodr I post too much
Reputation: 125
Joined: 19 Dec 2006 Posts: 2041
|
Posted: Mon Dec 15, 2008 11:29 pm Post subject: [C++]Hooking process Problem (( solved, don't post)) |
|
|
My trainer is almost finished
the problem is that at the moment of hooking it just doesn't x_x
can someone tell me whats wrong?
(( or maybe its a protection that the game haves? if so.. how is that cheat engine can hook on it? ... ))
BTW this is for Grand Chase USA
message boxes help because you have to hook in the main.exe as the gameguard loads then it dissapears and creates some more addresses in game
so the hack must be activated in game but hooked before the game loads completly
| Code: |
#include <windows.h>
#include <iostream>
void main()
{
MessageBox (NULL, "click to hook" , "hook", 0);
unsigned long PID;
HWND hWindow=FindWindow(NULL, "main");
HANDLE hProcess;
DWORD amp = 0x01;
DWORD Newdatasize=sizeof(amp);
if (hWindow != 0)
{
MessageBox (NULL, "Game Found" , "Game Found", 0);
CreateRemoteThread(hWindow, NULL, 0, 0, 0, NULL, NULL);
GetWindowThreadProcessId(hWindow, &PID);
hProcess=OpenProcess(PROCESS_ALL_ACCESS, TRUE, PID);
if (hProcess != 0)
{
MessageBox (NULL, "click this to activate after you are inside" , "activation", 0);
WriteProcessMemory(hProcess, (LPVOID)0x026A6F24, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x026A6F25, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x026A6F26, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x02707394, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x02707398, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x02651E6C, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x02651E70, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x026A6F10, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x026A6F11, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x026A6F12, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x026A6F28, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x026A6F29, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x026A6F2A, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x027078FC, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x02707900, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x026A6F2B, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x026A6F2C, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x026A6F2D, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x026A6F2E, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x02707ECC, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x02707ECF, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x02707ED0, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x026A6F1C, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x026A6F1D, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x026A6F1E, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x027068D4, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x027068D8, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x026A6F20, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x02706E44, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x02706E48, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x026A6F14, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x026A6F15, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x026A6F16, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x02705E44, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x02705E48, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x026A6F18, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x02706384, &, Newdatasize, 0);
WriteProcessMemory(hProcess, (LPVOID)0x02706388, &, Newdatasize, 0);
CloseHandle(hProcess);
MessageBox (NULL, "1 Hit KO Activated" , "1 Hit KO Activated", 0);
}
else
{
MessageBox (NULL, "Failed to activate the hack" , "Failed", 0);
}
}
else
{
MessageBox (NULL, "Couldn't find the Main.exe" , "Couldn't find", 0);
}
}
|
Last edited by gogodr on Wed Dec 17, 2008 1:29 am; edited 1 time in total |
|
| Back to top |
|
 |
Wintermoot Expert Cheater
Reputation: 0
Joined: 08 Nov 2007 Posts: 198
|
Posted: Mon Dec 15, 2008 11:41 pm Post subject: |
|
|
GameGuard detects calls to WriteProcessMemory.
You have to wait for GrandChase to unpack itself and then disable GG.
Also, I thought the monster addreses were in pointers.
Final thing, the values in those addresses change quite a lot. That means you need to freeze them.
|
|
| Back to top |
|
 |
gogodr I post too much
Reputation: 125
Joined: 19 Dec 2006 Posts: 2041
|
Posted: Mon Dec 15, 2008 11:53 pm Post subject: |
|
|
monster are in 4 byte addresses
yeah that may be a problem but for now.. the problem is that it doesnt hook
this
HWND hWindow=FindWindow(NULL, "main");
is not working right
|
|
| Back to top |
|
 |
Wintermoot Expert Cheater
Reputation: 0
Joined: 08 Nov 2007 Posts: 198
|
Posted: Tue Dec 16, 2008 12:16 am Post subject: |
|
|
| That's because you have it completely wrong. Go learn C++ before you make something idiotic like this.
|
|
| Back to top |
|
 |
gogodr I post too much
Reputation: 125
Joined: 19 Dec 2006 Posts: 2041
|
Posted: Tue Dec 16, 2008 12:49 am Post subject: |
|
|
| if you are so PRO and its all wrong, why dont you tell me whats wrong?
|
|
| Back to top |
|
 |
Wintermoot Expert Cheater
Reputation: 0
Joined: 08 Nov 2007 Posts: 198
|
Posted: Tue Dec 16, 2008 2:02 am Post subject: |
|
|
| gogodr wrote: | | if you are so PRO and its all wrong, why dont you tell me whats wrong? |
I am not saying I am pro, just that you have no idea what you are doing.
| Code: |
HWND FindWindow(
LPCTSTR lpClassName, //This is the classname of the window. I really don't know how to describe it.
LPCTSTR lpWindowName //This is the windows caption. You were saying that GrandChase's main window's caption was main. It definitely isn't.
);
|
I was merely angry that you are jumping straight into this sort of stuff without even understanding the basics.
http://msdn.microsoft.com/en-us/library/ms633499.aspx
MSDN and google should answer almost every question.
|
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Tue Dec 16, 2008 6:22 am Post subject: |
|
|
| Code: |
hProcess=OpenProcess(PROCESS_ALL_ACCESS, TRUE, PID);
|
| Code: |
hProcess = OpenProcess(PROCESS_VM_WRITE | PROCESS_VM_READ | PROCESS_CREATE_THREAD, FALSE, Pid);
|
i don't think you'll be able to write to process's memory with ALL_ACCESS.
plus all user32.dll api's are hooked while gg is on
don't have much time to check the rest of the code
oh and you can create a codecave to replace all those WPM lines using inline asm
|
|
| Back to top |
|
 |
GMZorita Grandmaster Cheater Supreme
Reputation: 0
Joined: 21 Mar 2007 Posts: 1361
|
Posted: Tue Dec 16, 2008 7:00 am Post subject: |
|
|
| 1qaz wrote: | | Code: |
hProcess=OpenProcess(PROCESS_ALL_ACCESS, TRUE, PID);
|
| Code: |
hProcess = OpenProcess(PROCESS_VM_WRITE | PROCESS_VM_READ | PROCESS_CREATE_THREAD, FALSE, Pid);
|
i don't think you'll be able to write to process's memory with ALL_ACCESS.
plus all user32.dll api's are hooked while gg is on
don't have much time to check the rest of the code
oh and you can create a codecave to replace all those WPM lines using inline asm |
Do you have any idea of what "ALL" means?
| msdn wrote: | | PROCESS_ALL_ACCESS All possible access rights for a process object. |
_________________
Gone |
|
| Back to top |
|
 |
gogodr I post too much
Reputation: 125
Joined: 19 Dec 2006 Posts: 2041
|
Posted: Tue Dec 16, 2008 8:41 am Post subject: |
|
|
| HawwwaH wrote: | | gogodr wrote: | | if you are so PRO and its all wrong, why dont you tell me whats wrong? |
I am not saying I am pro, just that you have no idea what you are doing.
| Code: |
HWND FindWindow(
LPCTSTR lpClassName, //This is the classname of the window. I really don't know how to describe it.
LPCTSTR lpWindowName //This is the windows caption. You were saying that GrandChase's main window's caption was main. It definitely isn't.
);
|
I was merely angry that you are jumping straight into this sort of stuff without even understanding the basics.
http://msdn.microsoft.com/en-us/library/ms633499.aspx
MSDN and google should answer almost every question. |
you were angry for nothing because of not knowing then -_-
because grand chase main application is main.exe
on cheat engine you need to hook the main.exe to apply the hack
there is a grandchase.exe but its only the launcher that verifys your files before starting the game then it launches the main.exe
I'm pretty sure I understand the bassis of programming ... -_-
http://img355.imageshack.us/img355/5611/79525667pc3.jpg
(( here is the file with the granchase files you can see there is the main.exe))
|
|
| Back to top |
|
 |
Noz3001 I'm a spammer
Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Tue Dec 16, 2008 8:45 am Post subject: |
|
|
The window isn't called main though...
|
|
| Back to top |
|
 |
gogodr I post too much
Reputation: 125
Joined: 19 Dec 2006 Posts: 2041
|
Posted: Tue Dec 16, 2008 8:56 am Post subject: |
|
|
| noz3001 wrote: | The window isn't called main though...  |
the process on the task manager processes list is called "main.exe"
I should change it to the name that its shown in the applications tab?
in the aplications tab it shows "GrandChase v08.06.15.0"
|
|
| Back to top |
|
 |
Noz3001 I'm a spammer
Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Tue Dec 16, 2008 9:20 am Post subject: |
|
|
| Whatever it show up as in the bar at the bottom.
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Tue Dec 16, 2008 9:29 am Post subject: |
|
|
The file name is main.exe, GrandChase v08.06.15.0 is the title. (also window name)
Don't expect coding anything this way, go learn the basics of C++ before jumping to coding lame trainers if anything at all, we're not gonna code it for you so stop asking us every stupid question you have, even when the error tells you exacly what the problem is you're asking us how to fix it? (http://forum.cheatengine.org/viewtopic.php?t=335953)
You don't even know the syntax of the language (http://forum.cheatengine.org/viewtopic.php?t=335919) and your code is inefficient (see first post) and it isn't even correct. (Passed the process name instead of window name as a parameters, for instance)
You can clearly see you just copy-pasted the code someone gave you.
http://cplusplus.com - enjoy.
|
|
| Back to top |
|
 |
Abilityfun How do I cheat?
Reputation: 0
Joined: 10 Jun 2007 Posts: 8
|
Posted: Tue Dec 16, 2008 11:22 am Post subject: |
|
|
| Before you copy and paste don't forget to initialize some of your variables, I can't even tell what you are trying to do with your code.
|
|
| Back to top |
|
 |
gogodr I post too much
Reputation: 125
Joined: 19 Dec 2006 Posts: 2041
|
Posted: Tue Dec 16, 2008 12:08 pm Post subject: |
|
|
well i dont care if some ppl doesnt like my method but this is my way to learn a language, this is the same way I learnt a little of Boreland delphi.
actually in this forum the only thing that helped me with this code was a reminder that I had to use this in a main anyways that wasnt the only solution I could kept it as a void HitKO and then make my main and call ir , t
or make a form and place a button that calls is, now I'm going to try changing the name and if something else is wrong, ok I wont ask for anymore here since most of ppl just doesnt know or if they know they are just "GTFO and learn by yourselft"
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|