 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
systat Advanced Cheater
Reputation: 0
Joined: 15 Feb 2008 Posts: 54
|
Posted: Tue Mar 11, 2008 3:28 am Post subject: I really need help |
|
|
I posted exactly same thread on unknown cheats forum,in 2 days no1 replied to my thread so i will repost my post your post her post here.
| Code: | I know way to change the memory by injecting dll in process, I do it like this.
Code:
#include <windows.h>
bool APIENTRY DllMain(HMODULE hModule, unsigned long ulReason, void* vpReserved)
{
if(ulReason == DLL_PROCESS_ATTACH)
{
unsigned long ulProtection;
BYTE* One = (BYTE*)GetModuleHandle("game.exe") + 0x21F1B0;
const int ciASCII = (const int)"EASY";
VirtualProtect(One, 4, PAGE_EXECUTE_READWRITE, &ulProtection);
memcpy(One, (const void*)ciASCII, 4);
VirtualProtect(One, 4, ulProtection, &ulProtection);
}
return true;
}
HOW TO DO THE EXACTLY SAME THING WITHOUT INJECTING DLL, SOME TRAINER LIKE CODE PLZ.
I TRIED FEW TRAINERS SOURCE CODE, BUT EVERY TIME I GET HANDLE ERROR. |
_________________
uuuuuuuuuuuuu |
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Tue Mar 11, 2008 3:40 am Post subject: |
|
|
| Quote: | HOW TO DO THE EXACTLY SAME THING WITHOUT INJECTING DLL, SOME TRAINER LIKE CODE PLZ.
I TRIED FEW TRAINERS SOURCE CODE, BUT EVERY TIME I GET HANDLE ERROR. |
You yell a lot for a girl.
|
|
| Back to top |
|
 |
Jani Grandmaster Cheater
Reputation: 2
Joined: 29 Dec 2006 Posts: 804
|
Posted: Tue Mar 11, 2008 3:41 am Post subject: Re: I really need help |
|
|
| systat wrote: | HOW TO DO THE EXACTLY SAME THING WITHOUT INJECTING DLL, SOME TRAINER LIKE CODE PLZ.
I TRIED FEW TRAINERS SOURCE CODE, BUT EVERY TIME I GET HANDLE ERROR. | OpenProcess, VirtualProtectEx, WriteProcessMemory.
|
|
| Back to top |
|
 |
systat Advanced Cheater
Reputation: 0
Joined: 15 Feb 2008 Posts: 54
|
Posted: Tue Mar 11, 2008 11:05 am Post subject: |
|
|
Damn, why i keep getting Handle error??
| Code: | DWORD proc_id;
GetWindowThreadProcessId(hWnd, &proc_id);
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, TRUE, proc_id);
cout << hProcess;
if(!hProcess)
{
cout << "Cannot open process!" << endl;
MessageBox(NULL, L"Cannot open process!", L"Error!", MB_OK + MB_ICONERROR);
} |
_________________
uuuuuuuuuuuuu |
|
| Back to top |
|
 |
Heartless I post too much
Reputation: 0
Joined: 03 Dec 2006 Posts: 2436
|
Posted: Tue Mar 11, 2008 2:31 pm Post subject: |
|
|
That happened to me too.
http://forum.cheatengine.org/viewtopic.php?t=191688&highlight=&sid=bc0d9da168ef3db8092693937e1351bb
This is Flyte's code, hope it helps
| Code: | //main.h: AdjustTokenToDebug function
BOOL AdjustTokenToDebug()
{
//Define variables.
LUID tLUID; HANDLE hToken; TOKEN_PRIVILEGES tTP, tTPOld;
DWORD lengthReturned; BOOL ret = TRUE;
//Fill the tLUID struct with our privilage info.
if(LookupPrivilegeValue(NULL,SE_DEBUG_NAME,&tLUID)) {
//Open the token up.
if(OpenProcessToken(GetCurrentProcess(),TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY,&hToken)) {
//Modify it so we become teh debuggzors.
tTP.PrivilegeCount=1;
tTP.Privileges->Attributes=SE_PRIVILEGE_ENABLED;
tTP.Privileges->Luid.HighPart=tLUID.HighPart;
tTP.Privileges->Luid.LowPart=tLUID.LowPart;
//Make the changes and check for errors.
if(!AdjustTokenPrivileges(hToken,0,&tTP,sizeof(tTP),&tTPOld,&lengthReturned))
ret = FALSE; //Bad
CloseHandle(hToken);
} else ret = FALSE; //Bad
} else ret = FALSE; //Bad
return ret;
} |
_________________
What dosen't kill you, usually does the second time. |
|
| 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
|
|