Results 1 to 9 of 9
  1. #1
    WhoAml's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    9
    Reputation
    10
    Thanks
    3

    C++ - Warcraft 3 maphack source code [Enjoy]

    Here is a source for one of my WC3 maphacks that I created, please do enjoy and learn from it!

    Features -
    Reveal units + buildings - main map + minimap
    Clickable units underfog
    HP bars underfog.

    These offsets ARE DETECTED on ladder play, this source code is for learning purposes.

    Code:
    #include <windows.h>
    #include <iostream>
    using namespace std;
    HWND hHack=FindWindow(NULL,"Warcraft III");
    
    //DECLARE FUNCTIONS
    void write(LPVOID addy, DWORD mydata);
    void enableDebugPrivileges();
    void dohack();
    
    
    //Main part
    int main() {
        if(!hHack)
        {
            cout << "Warcraft III window was not found" << endl;
            system("pause");
            exit(0);
        }
    	cout << "Hack is now loaded - visit <site address>  for future releases, more hacks tools and bots!" << endl;  
    	enableDebugPrivileges();
        dohack();          
        system("pause");
      }
    void write(LPVOID addy, DWORD mydata)
    {
        DWORD PID, TID;
        TID = ::GetWindowThreadProcessId (hHack, &PID);
        HANDLE hopen=OpenProcess( PROCESS_ALL_ACCESS|PROCESS_TERMINATE|PROCESS_VM_OPERATION|PROCESS_VM_READ|
                      PROCESS_VM_WRITE,FALSE,PID);
    
        WriteProcessMemory(hopen,addy,&mydata,1,0);
        CloseHandle(hopen);  
    }
    void enableDebugPrivileges()
    {
        HANDLE hcurrent=GetCurrentProcess();
        HANDLE hToken;
        BOOL bret=OpenProcessToken(hcurrent,40,&hToken);
        LUID luid;
        bret=LookupPrivilegeValue(NULL,"SeDebugPrivilege",&luid);
        TOKEN_PRIVILEGES NewState,PreviousState;
        DWORD ReturnLength;
        NewState.PrivilegeCount =1;
        NewState.Privileges[0].Luid =luid;
        NewState.Privileges[0].Attributes=2;
        AdjustTokenPrivileges(hToken,FALSE,&NewState,28,&PreviousState,&ReturnLength);
    }
    void dohack()
    {
         // Basic reveal
         write((LPVOID)0x6F3A20C5, 0xB8);	
         write((LPVOID)0x6F3A20C6, 0xFF);
         write((LPVOID)0x6F3A20C7, 0xFF);
         write((LPVOID)0x6F3A20C8, 0xFF);
         write((LPVOID)0x6F3A20C9, 0xFF);
         write((LPVOID)0x6F3A20CA, 0x90);
         write((LPVOID)0x6F3A20CB, 0x90);
         
         //Clickable units + reveal units minimap
          write((LPVOID)0x6F285CD0, 0x40);
          write((LPVOID)0x6F285CD1, 0x90);
    
    }
    Last edited by WhoAml; 09-05-2010 at 03:47 PM.

  2. The Following User Says Thank You to WhoAml For This Useful Post:

    Hell_Demon (09-05-2010)

  3. #2
    matthieu503's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    149
    Reputation
    10
    Thanks
    467
    My Mood
    Amused
    should i build it as dll or exe?
    Hey! , Yes you press the Thanks button if i helped in any way!

























  4. #3
    WhoAml's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    9
    Reputation
    10
    Thanks
    3
    You would compile it as an exe, however those offsets are detected on ladder play.

  5. #4
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    nice to see a wc3 release, they use warden(blizzards AC) right?
    Ah we-a blaze the fyah, make it bun dem!

  6. #5
    'Bruno's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Portugal
    Posts
    2,883
    Reputation
    290
    Thanks
    1,036
    My Mood
    Busy
    Not sure if warden is currently on.. I bet it is not..

    They usually turn it off for a while, for people to create hacks, use.. and then ban massive keys and get money from new games...

    At least they did it with D2, and they are doing it now with SC2.. It will be funny
    Light travels faster than sound. That's why most people seem bright until you hear them speak.

  7. #6
    WhoAml's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    9
    Reputation
    10
    Thanks
    3
    Quote Originally Posted by Hell_Demon View Post
    nice to see a wc3 release, they use warden(blizzards AC) right?
    That is correct, Warden is blizzards anti-cheat system.


    @Brinuz - Yes you're absolutley correct, they turn warden off from time to time, sometimes for a stretch of 3 months, then they make all the public hacks detected and get a nice big ban wave .

  8. #7
    JayFabulous's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    26
    Reputation
    10
    Thanks
    4
    My Mood
    Fine
    I appreciate you sharing, however I get 2 build errors.


    hack.cpp(4): error C2275: 'LPCWSTR' : illegal use of this type as an expression

    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winnt.h(357) : see declaration of 'LPCWSTR'

    hack.cpp(41): error C2664: 'LookupPrivilegeValueW' : cannot convert parameter 2 from 'const char [17]' to 'LPCWSTR'

    Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

  9. #8
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    Quote Originally Posted by JayFabulous View Post
    I appreciate you sharing, however I get 2 build errors.


    hack.cpp(4): error C2275: 'LPCWSTR' : illegal use of this type as an expression

    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winnt.h(357) : see declaration of 'LPCWSTR'

    hack.cpp(41): error C2664: 'LookupPrivilegeValueW' : cannot convert parameter 2 from 'const char [17]' to 'LPCWSTR'

    Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    Change the character set to multi-byte or use wide characters.

  10. The Following User Says Thank You to Void For This Useful Post:

    Hell_Demon (09-07-2010)

  11. #9
    258456's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    ghjghj
    Posts
    1,222
    Reputation
    18
    Thanks
    300
    My Mood
    Relaxed
    ok, why did threadstarter get banned?

    And nice code by the way.

Similar Threads

  1. [TUT] arnold's hack v1.1 vb6 source code
    By arnold in forum WarRock - International Hacks
    Replies: 6
    Last Post: 07-11-2008, 10:36 PM
  2. Stamina Hack and source code ?
    By Teh Sasuke in forum C++/C Programming
    Replies: 0
    Last Post: 12-31-2007, 05:08 PM
  3. [Release] ****** DLL Source Code
    By OneWhoSighs in forum WarRock - International Hacks
    Replies: 20
    Last Post: 10-25-2007, 07:41 AM
  4. keylogger source code
    By obsedianpk in forum WarRock - International Hacks
    Replies: 8
    Last Post: 10-24-2007, 02:31 PM
  5. HALO 2 (XBOX) Source Code
    By mirelesmichael in forum General Game Hacking
    Replies: 12
    Last Post: 09-23-2006, 04:35 AM