Ok i fixed the problem using :
Thanks to all that helpedCode:hWnd = processes[0].MainWindowHandle;![]()
Ok i fixed the problem using :
Thanks to all that helpedCode:hWnd = processes[0].MainWindowHandle;![]()
using your code i made this hope this help someone
this helpme during the prosses xD
i know the code is awful but... xDDCode:#include <iostream> #include <Windows.h> bool EnableDebugPrivilege(); using namespace std; HWND hwnd; DWORD ID; DWORD rw=0; HANDLE handle; unsigned int playerbase; unsigned int base; int main(void){ unsigned int puffer; unsigned int buffer; unsigned adress = 0x010B65F4; hwnd = 0; EnableDebugPrivilege(); hwnd = FindWindow(0,"World of Warcraft"); GetWindowThreadProcessId(hwnd, &ID); // Funktion handle = OpenProcess(PROCESS_ALL_ACCESS, 0, ID); cout <<"hwnd: " << hwnd << "\n"; cout <<"ID: " << ID << "\n"; cout <<"handle: " << handle << "\n"; ReadProcessMemory(handle, (LPCVOID)adress, &puffer, sizeof(puffer), &rw); cout <<"Step 1:" << puffer << "\n"; puffer = puffer + 0x34; cout <<"Step 2:" << puffer << "\n"; ReadProcessMemory(handle, (LPCVOID)puffer, &puffer, sizeof(puffer), &rw); cout <<"Step 3:" << puffer << "\n"; puffer = puffer + 0x24; cout <<"Step 4:" << puffer << "\n"; ReadProcessMemory(handle, (LPCVOID)puffer, &playerbase, sizeof(puffer), &rw); cout <<"PlayerBase:" << playerbase << "\n"; base = playerbase + 0x8; cout <<"Life Step 1:" << base << "\n"; ReadProcessMemory(handle, (LPCVOID)base, &base, sizeof(buffer), &rw); cout <<"Life Step 2:" << base << "\n"; base = base + 0x17 * 4; cout <<"Life Step 3:" << base << "\n"; ReadProcessMemory(handle, (LPCVOID)base, &buffer, sizeof(buffer), &rw); cout <<"\n------------------\n\nHP: " << buffer << "\n\n\n"; system("Pause"); } bool EnableDebugPrivilege() { TOKEN_PRIVILEGES priv; HANDLE hThis, hToken; LUID luid; hThis = GetCurrentProcess(); OpenProcessToken(hThis, TOKEN_ADJUST_PRIVILEGES, &hToken); LookupPrivilegeValue(0, TEXT("seDebugPrivilege"), &luid); priv.PrivilegeCount = 1; priv.Privileges[0].Luid = luid; priv.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; AdjustTokenPrivileges(hToken, false, &priv, 0, 0, 0); CloseHandle(hToken); CloseHandle(hThis); return true; }
sorri mi english xD
PD: this works every time i runned
Last edited by cxs; 05-01-2009 at 01:03 AM. Reason: add PD
Anyone can help me?
I can show my Hit Points with this code :
this is an extra test project and it worksCode:#include <iostream> #include <Windows.h> bool EnableDebugPrivilege(); using namespace std; HWND hwnd; DWORD ID; DWORD rw=0; HANDLE handle; unsigned int playerbase; unsigned int base; int mainzwei(void) { unsigned int puffer; unsigned int buffer; unsigned adress = 0x010B65F4; hwnd = 0; EnableDebugPrivilege(); hwnd = FindWindow(0,"World of Warcraft"); GetWindowThreadProcessId(hwnd, &ID); // Funktion handle = OpenProcess(PROCESS_ALL_ACCESS, 0, ID); ReadProcessMemory(handle, (LPCVOID)adress, &puffer, sizeof(puffer), &rw); puffer = puffer + 0x34; ReadProcessMemory(handle, (LPCVOID)puffer, &puffer, sizeof(puffer), &rw); puffer = puffer + 0x24; ReadProcessMemory(handle, (LPCVOID)puffer, &playerbase, sizeof(puffer), &rw); base = playerbase + 0x8; ReadProcessMemory(handle, (LPCVOID)base, &base, sizeof(buffer), &rw); base = base + 0x17 * 4; ReadProcessMemory(handle, (LPCVOID)base, &buffer, sizeof(buffer), &rw); cout <<"\nHP: " << buffer << "\n\n\n"; system("Pause"); } bool EnableDebugPrivilege() { TOKEN_PRIVILEGES priv; HANDLE hThis, hToken; LUID luid; hThis = GetCurrentProcess(); OpenProcessToken(hThis, TOKEN_ADJUST_PRIVILEGES, &hToken); LookupPrivilegeValue(0, TEXT("seDebugPrivilege"), &luid); priv.PrivilegeCount = 1; priv.Privileges[0].Luid = luid; priv.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; AdjustTokenPrivileges(hToken, false, &priv, 0, 0, 0); CloseHandle(hToken); CloseHandle(hThis); return true; } int main(void){ mainzwei(); }
but now i want to display ma Hit Points on a Text Label :
anyone an idea?Code:this->zXcoord->Text = "here i want to have my hit points :D";![]()
Last edited by halloman; 05-01-2009 at 05:40 AM.
a little function that i made
usage:Code:unsigned int ReadWowMem(unsigned int adress,unsigned int arg1,unsigned int arg2) { int i; buffer=adress; offset[0]=arg1; offset[1]=arg2; for(i=0;i<=2;i++) { ReadProcessMemory(handle, (LPCVOID)buffer, &buffer, sizeof(buffer), &rw); buffer+=offset[i]; } return buffer; }
can anyone helpmeto avoid theCode:playerbase=ReadWowMem(badress,0x34,0x24); cout <<"Hp: " << ReadWowMem(playerbase+0x8,0x17*4,0) << "\n";
offset[0]=arg1;
offset[1]=arg2;
is another method to do that?
dont wanna opent a topic fo this
Just interested, how do you retrieve this offset?
Code:0x010B65F4
Fix'd.Code:this->zXcoord->Text = "Health: " + healthVar;
Conversion will be necessary but since I don't know the syntax for C++ I'll just tell you how to do it in C# which would be Convert.ToString(var) or var.ToString() but idk in C++.
You have the solution though, so just cast it as a string.
I'd really like to post a facepalm pic now.
Apooooooooc!
flo8464: reverse engineering
Last edited by SKU; 05-02-2009 at 04:36 PM.
Yay! To make it even better, let's combine it with a lolcat!
(yeah I couldn't find a better one -.-)
This kid is ****ing money. Keep posting, man; I need the laughs.
/rant
Too bad botting theories, game hacking and process hijacking isn't common knowledge, maybe they should start teaching it in tech school so that everyone knows about it.
Really, I respect the work you do, but the attitude on this forum... I mean come on, instead of /facepalming and lol'ing at everyone that asks a question that is below your knowledge, doesn't mean that you knew that to begin with.
I bet you also started out in a scenario 'oh' not so different to the guy above your post.
It's really ****ing annoying, no one wants to ask questions (and you don't want them to learn) so essentially they could just shut the section because it's worthless without the Q&A.
Sigh, and no, it's not directly towards you Shynd, you just happened to be the one that got the reply.
Enjoy
/endrant
Ok i got the offset by myself...