Thread: C++

Page 1 of 3 123 LastLast
Results 1 to 15 of 35
  1. #1
    WeaponHacker's Avatar
    Join Date
    Oct 2011
    Gender
    male
    Posts
    232
    Reputation
    10
    Thanks
    23
    My Mood
    Relaxed

    C++

    Here i will explain some basics, for make a crossfire hack.

    First, you need to find some addys:

    Download Olly and Olly plugins, (atachment).
    Creat a script with c++, add this code:

    Code:
    #include "windows.h"
    #include <iostream>
    
    int main()
    {
    	DWORD err;
    	HINSTANCE hDLL = LoadLibrary("CShell.dll");               // Handle to DLL
    	if(hDLL != NULL) {
    		printf("Library has been loaded\n");
            }
    	else 	{
            err = GetLastError();
    		printf("Couldn't load dll\n");
    	}
    	system("pause");
    	return 0;
    }
    (credits to lauwy for the code)

    Put it in crossfire folder and run it.
    Open Olly and press atach, and find the program that u created.
    in the code that will show up, press "Shearch for--All referenced text (somthing like that)"
    Press "M" in the top.
    Then go to Plugins-Make Dump of process"
    it will show up a window, shearch for "Cshell 1000000000" and save it.
    Then close all, press open and select the file that u saved.
    Press Shift+F7+F8+F9, then press OK in the message that will show up.
    Right Click, Shearch for-- all referenced text
    And Find addys , for exemple, press right click, shearch text, select the 2 things, and whrite: ReloadAnimeRatio (for the no reload addy)

    Download Olly Here -> OllyDbg v1.10

    Now, open c++, press new project, select win32, then creat a win32 Project .
    It will show up a message, press next, select dll and press finish.
    It will Create a dll project, for manage the dll click were the image is showing:



    Then on Dllmain.cpp, just whrite the folowing:

    Add at the begining of ur code in c++ add this:

    Code:
    #include "stdafx.h"

    Then Define ur addys, for exemple:

    Code:
    #define noreload     0x2698
    Add this after defining and including:

    Code:
    DWORD WINAPI Hacks(LPVOID) 
    {
    Then just add ur function, for exemple:

    Code:
    bool hak = true;
    For continu add this:

    Code:
    while(1)
     {
    DWORD CShell = (DWORD)GetModuleHandleA("CShell.dll");
    DWORD pWeaponMgr = *(DWORD*)(CShell+WeaponMgr);
    Define the WeaponMgr, for find addy, go in olly shear noreload and the next addy will be 10A**** and somthing (* = a number), delete the "10" and add 0x at the begining

    After it just creat ur hack.

    Code:
    if (hak)
        {
       if (pWeaponMgr) //define weaponmgr
       {
           for(int i=0; i<560; i++)//560 is the number of the weapons, soo it will afect all weapons
    {
       if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) != NULL)
           *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) + NoReload ) = 150;//150 is the reload speed
    }


    Full code

    Code:
    #include "stdafx.h" 
    #define WeaponMgr                   0xA65EE8
    #define NoReload                    0x2698
    
    DWORD WINAPI Hacks(LPVOID) 
    {
    bool hak = true;
    bool recoil = true;
    
     while(1)
     {
    DWORD CShell = (DWORD)GetModuleHandleA("CShell.dll");
    DWORD pWeaponMgr = *(DWORD*)(CShell+WeaponMgr);
    	 
    if(hak)
    {
       if (pWeaponMgr)
       {
           for(int i=0; i<560; i++)
    {
       if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) != NULL)
           *(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) + NoReload ) = 150;
    }
       
    	   }
       }
    Sleep(100);
    }
    
    }
    
    bool Ready2Hook()
    {
       if(GetModuleHandleA("CShell.dll")   != NULL
       && GetModuleHandleA("ClientFx.fxd") != NULL)
           return 1;
       return 0;
    }
     
    DWORD WINAPI Wait(LPVOID)
    {
       while(!Ready2Hook()) Sleep(200);
            CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Hacks, NULL, NULL, NULL);
       return 0;
    }
     
    BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
    {
       DisableThreadLibraryCalls(hDll);
       
       if ( dwReason == DLL_PROCESS_ATTACH )
       {
           
           MessageBoxA(0, "your test Here for the message","your title message", 0);
            
     
            CreateThread(0,0,(LPTHREAD_START_ROUTINE)Wait,0,0,0);
       }
       return 1;
    }


    After all this, just debug it, by pressing the "start" icon up there.
    then go to your project folder--debug.
    then you will see a .dll file, thats it





    thx and add credits
    Last edited by WeaponHacker; 11-13-2011 at 12:09 AM.

  2. The Following 4 Users Say Thank You to WeaponHacker For This Useful Post:

    badboy3 (11-23-2011),Marijuana Man (11-14-2011),Ryuzaki™ (11-12-2011),smonist (11-14-2012)

  3. #2
    Poison's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Location
    california
    Posts
    11,788
    Reputation
    854
    Thanks
    1,216
    Trying to learn this

  4. #3
    WeaponHacker's Avatar
    Join Date
    Oct 2011
    Gender
    male
    Posts
    232
    Reputation
    10
    Thanks
    23
    My Mood
    Relaxed
    Good Luck

  5. #4
    Royku's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    G-Force.dll
    Posts
    3,015
    Reputation
    381
    Thanks
    3,308
    My Mood
    Devilish
    Deleted the attachment too Much Viruses in it sorry
    added the official olly link
    Last edited by Royku; 11-12-2011 at 04:11 PM.

  6. #5
    Ferris Bueller's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    KFC
    Posts
    7,361
    Reputation
    687
    Thanks
    998
    My Mood
    Hot
    ..
    Complicated.

  7. #6
    WeaponHacker's Avatar
    Join Date
    Oct 2011
    Gender
    male
    Posts
    232
    Reputation
    10
    Thanks
    23
    My Mood
    Relaxed
    Quote Originally Posted by Royku View Post
    Deleted the attachment to Much Viruses in it sorry
    added the official olly link
    false positives D:

    but thx anywais
    Last edited by Royku; 11-12-2011 at 04:30 PM.

  8. #7
    Royku's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    G-Force.dll
    Posts
    3,015
    Reputation
    381
    Thanks
    3,308
    My Mood
    Devilish
    Quote Originally Posted by WeaponHacker View Post


    false positives D:

    but thx anywais
    yea maybe but it 20/42 and 11/20 are to much sorry

  9. #8
    Johnn˙ 3 Tear's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Location
    CF|CA|PB Section
    Posts
    625
    Reputation
    45
    Thanks
    26
    My Mood
    Daring
    This is cool

  10. #9
    Royku's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    G-Force.dll
    Posts
    3,015
    Reputation
    381
    Thanks
    3,308
    My Mood
    Devilish
    ►Moved to Coding Section

  11. #10
    Ryuzaki™'s Avatar
    Join Date
    Apr 2011
    Gender
    male
    Location
    At my headquarter, catching KIRA
    Posts
    1,671
    Reputation
    41
    Thanks
    6,252
    My Mood
    Lurking
    Thanks for this now I know what to do after I learned C++, well I will try it thanks again!



  12. #11
    JusCaus's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    725
    Reputation
    23
    Thanks
    112
    My Mood
    Aggressive
    nice tutorial. Although i never use stdafx.
    And just change the noreload to 100 and i think its complete.
    [IMG]https://i1132.photobucke*****m/albums/m571/JusCausGraphix.jpg[/IMG]

  13. #12
    Code[VB]'s Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    CODER
    Posts
    608
    Reputation
    11
    Thanks
    702
    My Mood
    Bitchy
    lol you forgot DllMain

  14. #13
    iRageQ's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Posts
    20
    Reputation
    10
    Thanks
    2
    hmm...nice TUT..

  15. #14
    258456's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    ghjghj
    Posts
    1,222
    Reputation
    18
    Thanks
    300
    My Mood
    Relaxed
    You don't need stdafx.h at all. As a matter of fact it takes up much space and speed (not noticeable speed, but still). This is because it inludes a lot of libraries you don't need and aren't gonna use.

  16. #15
    JusCaus's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    725
    Reputation
    23
    Thanks
    112
    My Mood
    Aggressive
    Quote Originally Posted by 258456 View Post
    You don't need stdafx.h at all. As a matter of fact it takes up much space and speed (not noticeable speed, but still). This is because it inludes a lot of libraries you don't need and aren't gonna use.
    yeah leave that out. Use <windows.h> and your base.cpp or whatever you want. Then hack on!
    [IMG]https://i1132.photobucke*****m/albums/m571/JusCausGraphix.jpg[/IMG]

Page 1 of 3 123 LastLast