Jump to content
Welcome, Guest
Existing user? Sign In

Sign In



Sign Up
The MatriX
  • Welcome To Ghbsys
  • CS GO Streaming Version is released. Have fun streaming while cheating!
  • Have a Payment Issue? Send us a Support ticket.
  • Make a thread if you need support or join our discord for live support.
  • Have Suggestions? Make a thread and you'll earn Ghbsys Points for implemented suggestions.
  • Join our discord to stay well connected! Don't forget to integrate your discord to the site
  • Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum

    Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information for you to signup. Be apart of [GHB] - GAmEhAcKbAsTaRdS Forum by signing in or creating an account.
    • Start new topics and reply to others
    • Subscribe to topics and forums to get email updates
    • Get your own profile page and make new friends
    • Send personal messages to other members.

    [Help]My Hack is Not Function Normally


    _jhapoy021_
     Share

    Recommended Posts

    hey guys! anybody help me here?

    i have a problem project, my source is undetected...

    i have crosshair, chams, fullbright and xqz this source is for Specialforce,

    my chams and crosshair is automatic activated..

    actually i have no error in my code..

    ========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

     

    but if i try to inject in game, my crosshair is successfully ON (activated)

    but after a few seconds my crosshair is automatic disappear, and my chams is doesn't work , i can't activate

    here's my source:

     

    //    Project : Basic Special Force Hacks (D3D9)
    
    #include "stdafx.h"
    #include "base.h"
    #include "detours.h"
    
    #pragma comment(lib, "d3d9.lib")
    #pragma comment(lib, "d3dx9.lib")
    
    
    
    #define HOOK(func,addy) o##func = (t##func)CreateDetour((DWORD)hk##func,(DWORD)addy,Detour_Type_0xB8,7)//Quick Hook using CreateDetour UC-FORUM
    #define UNHOOK(func,addy) o##func = (t##func)CreateDetour((DWORD)o##func,(DWORD)addy,Detour_Type_0xB8,7)//Quick Unook using CreateDetour UC-FORUM
    
    #define ES  0 //EndScene
    #define DIP 1 //DrawIndexedPrimitive
    #define RES 2
    #define hD3D "d3d9.dll"
    
    //==================================Defines============================================
    
    //==============================My Model==================================== 
    
    //================================Defines Model Log============================
    
    
    LPDIRECT3DTEXTURE9 Red,Yellow,Green,Blue,Purple,Pink,Orange,White,Black;
    
    LPDIRECT3DDEVICE9 npDevice;
    
    float ScreenCenterX = 0.0f;
    float ScreenCenterY = 0.0f;
    
    FONT        pFont = NULL;
    LPCSTR		d3d9 = NULL;
    DWORD		Base;
    DWORD		BaseD3D;
    DWORD		dwD3D9;
    
    bool Color = true;
    int texnum;
    int m_Stride;
    int PrimitiveCount;
    int NumVertices;
    
    int xhair = 1;
    int xhair1;
    int chams = 1;
    int xqz;
    int QXZ;
    int Stride;
    int FullBright;
    
    void GetD3DBase()
    {
    while(!Base){
    Base = (DWORD)GetModuleHandle(d3d9);
    }
    }
    
    void IsD3DModuleLoaded()
    {
    while(GetModuleHandle("d3d9.dll") == 0){
    Sleep(100);
    }
    }
    
    
    D3DCOLOR colRed = D3DCOLOR_XRGB(255, 0, 0);
    D3DCOLOR colYellow = D3DCOLOR_ARGB (255,255,255,0);
    D3DVIEWPORT9 g_ViewPort;
    
    //oEndScene                pEndScene; 
    //oDrawIndexedPrimitive    pDrawIndexedPrimitive;
    
    LPDIRECT3DDEVICE9 pDevice;
    
    HRESULT GenerateTexture(IDirect3DDevice9 *pD3Ddev, IDirect3DTexture9 **ppD3Dtex, DWORD colour32)
    {
       if( FAILED(pD3Ddev->CreateTexture(8, 8, 1, 0, D3DFMT_A4R4G4B4, D3DPOOL_MANAGED, ppD3Dtex, NULL)) )
           return E_FAIL;
    
       WORD colour16 =    ((WORD)((colour32>>28)&0xF)<<12)
               |(WORD)(((colour32>>20)&0xF)<<
               |(WORD)(((colour32>>12)&0xF)<<4)
               |(WORD)(((colour32>>4)&0xF)<<0);
    
       D3DLOCKED_RECT d3dlr;    
       (*ppD3Dtex)->LockRect(0, &d3dlr, 0, 0);
       WORD *pDst16 = (WORD*)d3dlr.pBits;
    
       for(int xy=0; xy < 8*8; xy++)
           *pDst16++ = colour16;
    
       (*ppD3Dtex)->UnlockRect(0);
    
       return S_OK;
    }
    
    PBYTE HookVTableFunction( PDWORD* dwVTable, PBYTE dwHook, INT Index )
    {
    DWORD dwOld = 0;
    VirtualProtect((void*)((*dwVTable) + (Index*4) ), 4, PAGE_EXECUTE_READWRITE, &dwOld);
    
    PBYTE pOrig = ((PBYTE)(*dwVTable)[index]);
    (*dwVTable)[index] = (DWORD)dwHook;
    
    VirtualProtect((void*)((*dwVTable) + (Index*4)), 4, dwOld, &dwOld);
    
    return pOrig;
    
    }
    HRESULT WINAPI hkEndScene(LPDIRECT3DDEVICE9 pDevice)
    { 
    while(!npDevice) {         npDevice = pDevice;     } 
    
    
    pDevice->GetViewport(&g_ViewPort);
    ScreenCenterX = (float)g_ViewPort.Width / 2;
    ScreenCenterY = (float)g_ViewPort.Height / 2;
    
    if(pFont == NULL) D3DXCreateFont(pDevice, 25, 0, FW_BOLD, 1, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, ANTIALIASED_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Tahoma", &pFont);
    
    
    if(Color)
    {
    GenerateTexture(pDevice, &Red, D3DCOLOR_ARGB (255,255,0 ,0 ));
    GenerateTexture(pDevice, &Yellow, D3DCOLOR_ARGB (255,255,255,0 ));
    GenerateTexture(pDevice, &Green, D3DCOLOR_ARGB (255,0 ,255,0 ));
    GenerateTexture(pDevice, &Blue, D3DCOLOR_ARGB (255,0 ,0 ,255));
    GenerateTexture(pDevice, &Purple, D3DCOLOR_ARGB (255,102,0 ,153));
    GenerateTexture(pDevice, &Pink, D3DCOLOR_ARGB (255,255,20 ,147));
    GenerateTexture(pDevice, &Orange, D3DCOLOR_ARGB (255,255,165,0 ));
    GenerateTexture(pDevice, &Black, D3DCOLOR_ARGB (255,0 ,0 ,0 ));
    GenerateTexture(pDevice, &White, D3DCOLOR_ARGB (255,255,255,255));
    Color=false;
    }
    
    if(xhair)
    {
    D3DRECT rec2 = {ScreenCenterX-10, ScreenCenterY, ScreenCenterX+8, ScreenCenterY+1};
    D3DRECT rec3 = {ScreenCenterX, ScreenCenterY-8, ScreenCenterX+1, ScreenCenterY+8};
    pDevice->Clear(1, &rec2, D3DCLEAR_TARGET,colRed, 0, 0);
    pDevice->Clear(1, &rec3, D3DCLEAR_TARGET,colRed, 0, 0);
    }
    
    if(xhair1)
    {
    D3DRECT rec12 = {ScreenCenterX-10, ScreenCenterY, ScreenCenterX+ 8, ScreenCenterY+1};
    D3DRECT rec13 = {ScreenCenterX, ScreenCenterY-8, ScreenCenterX+ 1,ScreenCenterY+8}; 
    pDevice->Clear( 1, &rec12, D3DCLEAR_TARGET,colYellow, 0, 0);
    pDevice->Clear( 1, &rec13, D3DCLEAR_TARGET,colYellow, 0, 0);
    }
    
    
    
    
    if (GetAsyncKeyState(VK_NUMPAD1)&1) //Hotkey for Crosshair
    { xhair = !xhair; }
    
    if (GetAsyncKeyState(VK_NUMPAD2)&1) //Hotkey for Crosshair
    { xhair1 = !xhair1; }
    
    if (GetAsyncKeyState(VK_NUMPAD3)&1) //Hotkey for Naked 
    { xqz = !xqz; }
    
    if (GetAsyncKeyState(VK_NUMPAD4)&1) // Hotkey for Wallhack
    { chams= !chams; }
    
    if (GetAsyncKeyState(VK_NUMPAD5)&1) // Hotkey for Wallhack
    { FullBright= !FullBright; }
    
    
    
    return oEndScene(pDevice);
    }
    
    HRESULT WINAPI hkDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE Type, INT BaseIndex, 
    UINT MinIndex, UINT NumVertices, UINT StartIndex, UINT PrimitiveCount)
    {
    HRESULT hRet = oDrawIndexedPrimitive(pDevice, Type, BaseIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
    //--------------------Player Wallhack ----------------------------------------------
    
    if (chams)
    {
    if (ForceRecon ||
    (ForceReconAddons)||
    (Mulan)||
    (MulanAddons )||
    (SRG)||
    (SRGAddons )||
    (KSF)||
    (KSFAddons)||
    (SAS)||
    (SASAddons)||
    (ROKMC)||
    (ROKMCAddons)||
    (GSG9 )||
    (GSG9Addons)||
    (GIGN)||
    (GIGNAddons)||
    (Delta)||
    (DeltaAddons)||
    (Spetsnaz )||
    (SpetsnazAddons)||
    (BlackDevil )||
    (PSU)||
    (PSUAddons)||
    (DevilWings)||
    (AngelWings)||
    (ZombieGirl)||
    (ZombieMale)||
    (Tanker)||
    (Risa)||
    (Smokes)||
    (Nades)||
    (Flash)||
    (BackPack))
    {
    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
    pDevice->SetTexture(0,Yellow);
    oDrawIndexedPrimitive(pDevice, Type, BaseIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
    pDevice->SetTexture(0,Blue);
    }
    }
    //-----------------------------------------FullBright--------------------
    if(FullBright)
    {
    if(Stride == 40)
    {
    pDevice->SetRenderState(D3DRS_LIGHTING, false); //d3d lighting off
    pDevice->SetRenderState(D3DRS_AMBIENT,D3DCOLOR_ARGB(255,255,255,255)); // use all colors to glow up the lighting ingame
    
    }
    
    }
    
    //--------------------------------FullBright End-------------------
    
    
    //-------------------  Naked  Start------------------------------------------
    
    if(xqz)
    {
    if (ForceRecon ||
    (ForceReconAddons)||
    (Mulan)||
    (MulanAddons )||
    (SRG)||
    (SRGAddons )||
    (KSF)||
    (KSFAddons)||
    (SAS)||
    (SASAddons)||
    (ROKMC)||
    (ROKMCAddons)||
    (GSG9 )||
    (GSG9Addons)||
    (GIGN)||
    (GIGNAddons)||
    (Delta)||
    (DeltaAddons)||
    (Spetsnaz )||
    (SpetsnazAddons)||
    (BlackDevil )||
    (PSU)||
    (PSUAddons)||
    (DevilWings)||
    (AngelWings)||
    (ZombieGirl)||
    (ZombieMale)||
    (Tanker)||
    (Risa)||
    (Smokes)||
    (Nades)||
    (Flash)||
    (BackPack))
    {
    DWORD dwZEnable = D3DZB_TRUE;
    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
    oDrawIndexedPrimitive(pDevice, Type, BaseIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
    }
    else{         
    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
    }
    }
    
    
    return hRet;
    }
    
    
    
    #define _CDETOURS_H
    
    #include <windows.h>
    
    class cDetours
    {
       public:
           DWORD CreateJMP_EAX( DWORD  SrcVA, DWORD  DstVA, DWORD  Size );
           DWORD CreateJMP_REL( DWORD  SrcVA, DWORD  DstVA, DWORD  Size );
           void * CreateJMP(BYTE *org, CONST BYTE *det, INT len);
           LPVOID CreateJZ(LPVOID lpFuncOrig, LPVOID lpFuncDetour);
           void *memcpy_s( void* pvAddress, const void* D3DPERF_QueryRepeatFrame, size_t stLen );
       private:
           INT GetDetourLenAuto(PBYTE &pbFuncOrig,INT minDetLen);
    
    };
    
    
    //--Credits to DrUnKeN ChEeTaH--------------------------------------------------------------------------------------------------------
    LRESULT CALLBACK MsgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam){return DefWindowProc(hwnd, uMsg, wParam, lParam);}
    void DX_Init(DWORD* table)
    {
       WNDCLASSEX wc = {sizeof(WNDCLASSEX),CS_CLASSDC,MsgProc,0L,0L,GetModuleHandle(NULL),NULL,NULL,NULL,NULL,"DX",NULL};
       RegisterClassEx(&wc);
       HWND hWnd = CreateWindow("DX",NULL,WS_OVERLAPPEDWINDOW,100,100,300,300,GetDesktopWindow(),NULL,wc.hInstance,NULL);
       LPDIRECT3D9 pD3D = Direct3DCreate9( D3D_SDK_VERSION );
       D3DPRESENT_PARAMETERS d3dpp;
       ZeroMemory( &d3dpp, sizeof(d3dpp) );
       d3dpp.Windowed = TRUE;
       d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
       d3dpp.BackBufferFormat = D3DFMT_UNKNOWN;
       LPDIRECT3DDEVICE9 pd3dDevice; 
       pD3D->CreateDevice(D3DADAPTER_DEFAULT,D3DDEVTYPE_HAL,hWnd,D3DCREATE_SOFTWARE_VERTEXPROCESSING,&d3dpp,&pd3dDevice);
       DWORD* pVTable = (DWORD*)pd3dDevice;
       pVTable = (DWORD*)pVTable[0];
    
       table[ES]   = pVTable[42];                    //EndScene address
       table[DIP]  = pVTable[82];                    //DrawIndexedPrimitive address  
       table[RES]  = pVTable[16];                    //DrawIndexedPrimitive address  
       DestroyWindow(hWnd);
    }
    //------------------------------------------------------------------------------------------------------------------------------------
    
    
    DWORD WINAPI VirtualMethodTableRepatchingLoopToCounterExtensionRepatching( LPVOID  Param )
    {
       while(1) {
           Sleep(100);
    
           HookVTableFunction((PDWORD*)npDevice, (PBYTE)Base + 1024, 82); 
           HookVTableFunction((PDWORD*)npDevice, (PBYTE)Base + 1036, 42); 
       }
    
       return 1;
    }
    bool hooked = false;
    DWORD WINAPI LoopFunction( LPVOID lpParam  )
    { 
    while(1){
    if( hooked == false) {
    DWORD VTable[3] = {0};
    
    IsD3DModuleLoaded();
    GetD3DBase();
    DX_Init(VTable);
    HOOK(EndScene,VTable[ES]);
    
    while(!pDevice) {
    Sleep(50);
    }
    UNHOOK(EndScene, VTable[ES]);
    
    void* d3DIP = (void*)(dwD3D9 + (DWORD) + (DWORD) + (DWORD) + (PDWORD)BaseD3D + 1024);//0x4FF50A4B[82]
    void* d3ES  = (void*)(dwD3D9 + (DWORD) + (DWORD) + (DWORD) + (PDWORD)BaseD3D + 1036);//0x4FF19FEA[42]
    {
    int i;
    for (i = 0 ; i <= 0 ; i++){
    DWORD d,ds;
    VirtualProtect((void*)(d3ES), 4, PAGE_EXECUTE_READWRITE, &d);
    memcpy(d3ES,(void*)(d3ES), 4);  
    VirtualProtect((void*)(d3ES), 4, d, &ds);
    }
    }
    int C;
    for (C = 0 ; C <= 0 ; C++){
    {
    DWORD d,ds;
    VirtualProtect((void*)(d3DIP), 4, PAGE_EXECUTE_READWRITE, &d);
    memcpy(d3DIP,(void*)(d3DIP), 4);  
    VirtualProtect((void*)(d3DIP), 4, d, &ds);
    }
    }
    //------------------//
    CreateDetour((DWORD)hkDrawIndexedPrimitive, (DWORD)d3DIP*C,Detour_Type_0xB8,7);
    CreateDetour((DWORD)hkEndScene, (DWORD)d3ES*C,Detour_Type_0xB8,7);
    
    
    *(PDWORD)&oDrawIndexedPrimitive = VTable[DIP];
    *(PDWORD)&oEndScene = VTable[ES];
    //===========//
    CreateThread(NULL,0,&VirtualMethodTableRepatchingLoopToCounterExtensionRepatching,NULL,0,NULL); //Create hooking thread
    hooked = true;
    }
    Sleep(10);
    void* d3DIP = (void*)(dwD3D9 + (DWORD) + (DWORD) + (DWORD) + (PDWORD)BaseD3D + 1024);//0x4FF505B0[82]
    void* d3ES  = (void*)(dwD3D9 + (DWORD) + (DWORD) + (DWORD) + (PDWORD)BaseD3D + 1036);//0x4FF50260[42]
    {
    DWORD Dark,ds;
    VirtualProtect((void*)(d3ES), 4, PAGE_EXECUTE_READWRITE, &Dark);
    memcpy((void*)d3ES, (const void*)d3ES, 4); 
    VirtualProtect((void*)(d3ES), 4, Dark, &ds);
    }
    int i;
    for (i = 0 ; i <= 15 ; i++){
    {
    DWORD d,ds;
    VirtualProtect((void*)(d3DIP), 4, PAGE_EXECUTE_READWRITE, &d);
    memcpy((void*)d3DIP, (const void*)d3DIP, 4); 
    VirtualProtect((void*)(d3DIP), 4, d, &ds);
    }
    }
    while( 1 )
    {
    Sleep(200);
    
    
    
    int i;
    for (i = 0 ; i <= 15 ; i++){
    if(memcmp((void *)d3DIP, (void *)d3DIP, 82) == 0 ) // Protect Hook Draw Indexed Primitive
    ProtectHook((LPDWORD*)pDevice, (PBYTE)d3DIP, 82);
    }
    
    
    for (i = 0 ; i <= 15 ; i++){
    if(memcmp((void *)d3ES, (void *)d3ES, 42) == 0 )   // Protect Hook End Scene
    ProtectHook((LPDWORD*)pDevice, (PBYTE)d3ES, 42);
    }
    }
    Sleep(10);
    }
    return 0;
    }
    
    BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved)
    {
    	  if(dwReason == DLL_PROCESS_ATTACH) {  
    	Beep(1000,100);
           CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)LoopFunction,NULL,0,NULL);  
    
    	  }
       return TRUE;
    }  

     

    help me here please....

    thanks in advance..

    Link to comment
    Share on other sites

    this was posted for soldier front http://www.unknowncheats.me/forum/direct3d/76190-soldier-front-dfi-undetected-source-code.html ( gameguard )

     

    but specialforce is using hackshield, i am not sure but might possible that hackshield detects the hook and removes it, if its added again they may kick...

    • Downvote 1
    Link to comment
    Share on other sites

    this was posted for soldier front http://www.unknowncheats.me/forum/direct3d/76190-soldier-front-dfi-undetected-source-code.html ( gameguard )

     

    but specialforce is using hackshield, i am not sure but might possible that hackshield detects the hook and removes it, if its added again they may kick...

     

     

    thanks for reply actually sir. this source is for DFI PSF (hackshield)

    i try to put in my base but now my problem is don't send error... can you help me?

    i upload my whole folder of my project..

    http://lh.rs/WYwxmc7mD83P

     

    don't worry its clean so i don't need any virus scan only source...

    Link to comment
    Share on other sites

    • 2 weeks later...
    Guest
    This topic is now closed to further replies.
     Share

    • Recently Browsing   0 members

      • No registered users viewing this page.
    ×
    ×
    • Create New...