Why not just use WriteProcessMemory?
and you are not injecting a dll.
Hi, im trying to make a MapleStory Trainer.
I have my injector which injects the code by doing this:
and this is the function that is called from the dll:Code:void Inject(string dll, string function, int index) { char wndName[255]; sprintf(wndName, "MapleStory %i", index); HWND hackWnd = FindWindow(0, wndName); if (hackWnd == 0) { MessageBox(0, "Cannot find MapleStory", "Failzor", 0); } DWORD pid; GetWindowThreadProcessId(hackWnd, &pid); HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, false, pid); if (hProcess == 0) { MessageBox(0, "Cannot find MapleStory Process", "Failzor", 0); } HMODULE dllModule = LoadLibrary(dll.c_str()); FARPROC functionStart = GetProcAddress(dllModule, function.c_str()); CreateRemoteThread(hProcess, NULL, 0, (LPTHREAD_START_ROUTINE)functionStart, NULL, 0, NULL); }
When I run the Inject function Maplestory starts lagging and then stops working after about a second.Code:extern "C" __declspec(dllexport) void FullGodmodeOn() { DWORD addy = 0x00961B6C; BYTE Enable[] = {0x0F, 0x84, 0x59, 0x21, 0x00, 0x00}; memcpy((void*)addy, Enable, sizeof(Enable)); }
Is there something wrong with my injection method, my dll or is it just maplestory?
My Youtube
Check it out for Dubstep, commentarys, hacks, hack tutorials and other stuffs
List of achievments
= finished
= not done
make a solitaire trainer(shutup) =
diablo 2 trainer =
Why not just use WriteProcessMemory?
and you are not injecting a dll.
Last edited by open|Fire; 06-04-2011 at 07:44 PM.
You can use write process memory to write an array of bytes?
My Youtube
Check it out for Dubstep, commentarys, hacks, hack tutorials and other stuffs
List of achievments
= finished
= not done
make a solitaire trainer(shutup) =
diablo 2 trainer =
of course you can
Code:WriteProcessMemory(hProcess, (void*)0x00961B6C, &Enable, 6, NULL); or WriteProcessMemory(hProcess, (void*)0x00961B6C, "\x0F\x84\x59\x21\x00\x00", 6, NULL);
Well that works DD thanks you but I have one problem and idk what it is.
When I use cheat engine to write the aob I use
So in c++ Im guessing I write the bytesCode:db 0F 84
but that does not change it correctly?Code:BYTE bytes[] = {0x0F, 0x84}
My Youtube
Check it out for Dubstep, commentarys, hacks, hack tutorials and other stuffs
List of achievments
= finished
= not done
make a solitaire trainer(shutup) =
diablo 2 trainer =
with the posted code you load the dll in your injectors' process and then create a thread to 0x00000000 in the target process.
as for the byte string: unsigned char* bytestr = "\x0F\x84";
Ah we-a blaze the fyah, make it bun dem!
it works kindof :/ well the kindof is a problem in my code that I know how to fix. Also the reason maplestory was crashing is because 0x00961B6C isnt an address I forgot to takeout the 2 zeros when I came over from cheat engine the real address is 0x961B6C and thank you the new way of writing bytes works
My Youtube
Check it out for Dubstep, commentarys, hacks, hack tutorials and other stuffs
List of achievments
= finished
= not done
make a solitaire trainer(shutup) =
diablo 2 trainer =