C++ can*t  open process World of Warcraft ( error 5) menu

User Tag List

Results 1 to 5 of 5
  1. #1
    lustikus12's Avatar Banned
    Reputation
    -2
    Join Date
    Jul 2009
    Posts
    17
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    C++ can*t open process World of Warcraft ( error 5)

    Hello i tray Memoryreading with c++ the first time ok her is my sourche :
    Code:
    // Memory.cpp: Hauptprojektdatei.
    
    #include "stdafx.h"
    
    using namespace System;
    
    #define WIN32_LEAN_AND_MEAN  
    #include <windows.h>
    #include <iostream>
    #include <tchar.h>
    #include <string>
    #pragma comment(lib, "user32.lib")
    #pragma comment(lib, "kernel32.lib")
    #define SE_DEBUG_NAME TEXT(*SeDebugPrivilege*)
    //#pragma comment(lib, "gdi32.lib") 
    using namespace std;
    
    int _tmain(int argc, _TCHAR* argv[])// lol, ich nenns immer int main(int argc, char *argv[]) ^^
    { 
    	HWND hWindow;
    	DWORD dwProcId;
    	DWORD rw=0;
    	HANDLE hProcess;
    	int ID;
    
    	int puffer = 0;
    	unsigned int adresse = 0x007E75E4;
    	printf("Searching hWnd...\n");                                                                
    	while(!(hWindow = FindWindow(NULL, L"World of Warcraft")));     //Das it ein LPWSTR (oder so ähnlich^^) da musst du ein L davorstellen
    	{Sleep(50);}
    	printf("hWnd: 0x%i\n",hWindow);
    	if(!hWindow);
    	printf("Searching PocessId...\n");
    	do
    	{GetWindowThreadProcessId(hWindow, &dwProcId);}while(!dwProcId);
            printf("dwProcId: 0x%i\n", dwProcId);
    
    	printf("Searching Process Handle\n");
    	hProcess = OpenProcess(PROCESS_QUERY_INFORMATION|PROCESS_VM_READ|PROCESS_TERMINATE,false,dwProcId);
    	if (hProcess) 
                    printf("Prozess opend!\n");
    	else
    		printf("Prozess not opend!\n");
            printf("Porcess Handle: 0x%i\n", hProcess);
    
           ReadProcessMemory(hProcess, (LPCVOID)adresse, &puffer, sizeof(puffer), &rw);
    	   std::cout<< puffer;                                                            
           Sleep(2000);
    	   CloseHandle(hProcess);   
    	   std::cin >> ID ;
    	   return 0;
    }
    ok i test it, it going until he should atach the Process. i think the best is if you test it by your own. It would be verry nice if you could help me sorry for my bad english =(

    C++ can*t  open process World of Warcraft ( error 5)
  2. #2
    grosfilsdepute's Avatar Member
    Reputation
    1
    Join Date
    Mar 2008
    Posts
    26
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to enable the debug mode privileges if you want to open wow.exe.

    Take a look at MSDN : OpenProcessToken, LookupPrivilegeValue and AdjustTokenPrivileges functions.
    Last edited by grosfilsdepute; 08-22-2009 at 10:06 PM.

  3. #3
    grigitokarz's Avatar Member
    Reputation
    1
    Join Date
    Feb 2008
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    here u got some frags from my waypoint bot
    Code:
    #include <cstdlib>
    #include <iostream>
    #include <Windows.h>
    #include <tlhelp32.h>
    #include <string.h>
    #include <vcclr.h>
    BOOL SetDebugPrivileges()
    {
       BOOL               bRET = FALSE;
       TOKEN_PRIVILEGES   tp;
       HANDLE             hToken;
    
       if (LookupPrivilegeValue(NULL, SE_DEBUG_NAME, &tp.Privileges[0].Luid))
       {
          if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &hToken))
          {
             if (hToken != INVALID_HANDLE_VALUE)
             {
                tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
                tp.PrivilegeCount = 1;
                if (AdjustTokenPrivileges(hToken, FALSE, &tp, 0, 0, 0))
                   bRET = TRUE;
                CloseHandle(hToken);
             }
          }
       }
       return bRET;
    }
    DWORD ProcId = 0; 
    void GetProcId(const char* chara)
    {
        PROCESSENTRY32   pe32;
        HANDLE         hSnapshot = NULL;
    
        pe32.dwSize = sizeof( PROCESSENTRY32 );
        hSnapshot = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 );
    
        if( Process32First( hSnapshot, &pe32 ) )
        {
            do{
                if( strcmp( pe32.szExeFile, chara ) == 0 )
                    break;
            }while( Process32Next( hSnapshot, &pe32 ) );
        }
    
        if( hSnapshot != INVALID_HANDLE_VALUE )
            CloseHandle( hSnapshot );
    
       ProcId= pe32.th32ProcessID;
    }
    than
    Code:
    SetDebugPrivileges();
    	char chara[]="Wow.exe";
    	GetProcId(chara);
    	process = OpenProcess(PROCESS_ALL_ACCESS, FALSE, ProcId);
    	ReadProcessMemory(process,(LPVOID)aClientConnection,(LPVOID)&connection,sizeof(DWORD),0);//client connection <- simply read
    simply code which should help

  4. #4
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't use PROCESS_ALL_ACCESS. That flag is evil.

  5. #5
    KOS0937's Avatar Member
    Reputation
    18
    Join Date
    May 2008
    Posts
    129
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    pleeeease get used to some spacing standards... there is absolutely no structure in your source code
    e.g. write
    Code:
    if (condition) {
      do1;
      do2;
    }
    or
    Code:
    if (condition)
    {
      do1;
      do2;
    }
    This will help you avoid lines like "if(!hWindow);" etc. and thus avoid bugs!
    Last edited by KOS0937; 08-23-2009 at 05:31 PM.

Similar Threads

  1. [Buying] How you can make real ££ $$ € € from World of Warcraft
    By WowMountsUK in forum World of Warcraft Buy Sell Trade
    Replies: 0
    Last Post: 07-01-2015, 07:47 AM
  2. [How-To] How can I backup my World of Warcraft Folder?
    By patrickfew in forum MMO Exploits|Hacks
    Replies: 2
    Last Post: 11-23-2010, 07:26 AM
  3. World of Warcraft Project Reborn is in Open Beta:
    By shadowquinn in forum WoW Emulator Server Listings
    Replies: 0
    Last Post: 02-12-2009, 08:15 AM
  4. Play world of warcraft without going through the launcher process!
    By Tango in forum World of Warcraft Exploits
    Replies: 14
    Last Post: 05-22-2007, 09:39 AM
  5. Can u copy from the internet and then paste in world of warcraft??
    By sk8erevan in forum World of Warcraft General
    Replies: 9
    Last Post: 11-30-2006, 02:32 AM
All times are GMT -5. The time now is 10:08 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search