Results 1 to 14 of 14
  1. #1
    XPS Hacking's Avatar
    Join Date
    Nov 2012
    Gender
    male
    Posts
    76
    Reputation
    10
    Thanks
    756
    My Mood
    Cool

    Stride Logger D3D To Find Wallhack



    /*================================================= ================================================== ===================
    Created By : JuwendiVB
    Tools : Stride Logger D3D .
    Function : Search Stride,NumVertice,PrimitiveCount
    Copyright : 28/02/2013
    ================================================== ================================================== ====================*/
    #include <windows.h>
    #include <fstream>
    #include <stdio.h>
    #include <vector>
    #include <conio.h>

    #include <d3d9.h>
    #include <d3dx9.h>

    #pragma comment( lib, "d3d9.lib" )
    #pragma comment( lib, "d3dx9.lib" )
    #pragma warning( disable : 4996 )
    BYTE Bypass[7] = {0x73, 0x1E, 0x68, 0x00, 0x00, 0x04, 0x00}; //
    BYTE Bypass2[7] = {0x74, 0x1E, 0x68, 0x00, 0x00, 0x04, 0x00}; //
    DWORD Juwendivb = 0;
    DWORD XpsTeam = 0;
    LPTSTR COD = "MAT.exe";
    void Patch(void *adr, void *ptr, int size)
    {
    DWORD NewProtection;
    VirtualProtect(adr,size,PAGE_EXECUTE_WRITECOPY, &NewProtection);
    memcpy(adr,ptr,size);
    VirtualProtect(adr,size,NewProtection, &NewProtection);
    }
    using namespace std;
    //-------------------------------------------------------------------

    typedef struct _STRIDELOG{
    INT Base; UINT Min;
    UINT Num; UINT Start;
    UINT Prim;
    }STRIDELOG,*PSTRIDELOG;

    HRESULT ( WINAPI* oReset )
    ( LPDIRECT3DDEVICE9, D3DPRESENT_PARAMETERS* );

    HRESULT ( WINAPI* oEndScene )
    ( LPDIRECT3DDEVICE9 );

    HRESULT ( WINAPI* oDrawIdP )
    ( LPDIRECT3DDEVICE9, D3DPRIMITIVETYPE,
    INT, UINT, UINT, UINT, UINT );

    STRIDELOG StrideLog;
    vector<STRIDELOG> STRIDE;
    vector<DWORD> BASETEX;
    D3DPRESENT_PARAMETERS PrP = {NULL};
    LPDIRECT3DBASETEXTURE9 BTEX = NULL;
    LPDIRECT3DDEVICE9 pDev = NULL;
    LPDIRECT3DTEXTURE9 Red = NULL;
    LPDIRECT3DTEXTURE9 pTx = NULL;
    DWORD dCrDev = NULL;
    LPDIRECT3D9 pDx = NULL;
    LPD3DXFONT pFont = NULL;
    D3DVIEWPORT9 Vpt;
    D3DLOCKED_RECT d3dlr;
    PDWORD VTab = NULL;
    DWORD Old = NULL;
    ofstream ofile;
    char dlldir[320];
    char strbuff[260];
    UINT iStride = 0;
    UINT iBaseTex = 0;
    bool Found = false;
    bool Startlog = false;

    void __cdecl add_log
    (const char *fmt, ...);

    //-------------------------------------------------------------------

    __declspec( naked )
    VOID WINAPI CREATEDEVICE( VOID )
    {
    __asm
    {
    PUSH EBP
    MOV EBP,ESP
    PUSH [EBP+0x20]
    PUSH [EBP+0x1C]
    PUSH [EBP+0x18]
    PUSH [EBP+0x14]
    PUSH [EBP+0x10]
    PUSH [EBP+0xC]
    PUSH [EBP+0x8]
    CALL [dCrDev]
    MOV EDX,[EBP+0x20]
    MOV EDX,[EDX]
    MOV [pDev],EDX
    POP EBP
    RETN 0x1C
    }
    }

    //-------------------------------------------------------------------

    HRESULT WINAPI nDrawIdP
    ( LPDIRECT3DDEVICE9 pDev, D3DPRIMITIVETYPE Type,
    INT Base, UINT Min, UINT Num, UINT Start, UINT Prim )
    {
    LPDIRECT3DVERTEXBUFFER9 Stream_Data;
    UINT Offset = 0;
    UINT Stride = 0;

    if(pDev->GetStreamSource
    ( 0, &Stream_Data, &Offset, &Stride )==S_OK)
    Stream_Data->Release();

    if(Stride == iStride)
    {
    pDev->GetTexture( 0, &BTEX );
    Found = false;

    for( UINT i = 0;i < BASETEX.size();i++ )
    if( BASETEX[i] == (DWORD)BTEX )
    Found = true;

    if( Found == false )
    BASETEX.push_back
    ( (DWORD)BTEX );

    if( BASETEX[iBaseTex] == (DWORD)BTEX && Red )
    {
    pDev->SetTexture( 0, Red );
    pDev->SetRenderState( D3DRS_ZENABLE, FALSE );
    oDrawIdP( pDev, Type, Base, Min, Num, Start, Prim );
    pDev->SetRenderState( D3DRS_ZENABLE, TRUE );

    if( Startlog == true )
    {
    Found = false;
    for( UINT i = 0;i < STRIDE.size();i++ )
    if( STRIDE[i].Base == Base &&
    STRIDE[i].Min == Min &&
    STRIDE[i].Num == Num &&
    STRIDE[i].Start == Start &&
    STRIDE[i].Prim == Prim )
    {
    Found = true;
    break;
    }

    if( Found == false )
    {
    StrideLog.Base = Base;
    StrideLog.Min = Min;
    StrideLog.Num = Num;
    StrideLog.Start = Start;
    StrideLog.Prim = Prim;

    add_log( "(NumVertices == %i && PrimitiveCount == %i && Stride == %i)",
    Num, Prim, Stride );

    STRIDE.push_back
    ( StrideLog );
    }
    }
    }
    }

    return oDrawIdP( pDev, Type,
    Base, Min, Num, Start, Prim );
    }

    //-------------------------------------------------------------------

    HRESULT WINAPI nEndScene
    ( LPDIRECT3DDEVICE9 pDev )
    {
    pDev->GetViewport( &Vpt );

    RECT FRect = { Vpt.Width-250,Vpt.Height-300,
    Vpt.Width,Vpt.Height };

    if( Red == NULL )
    if( pDev->CreateTexture(8, 8, 1, 0, D3DFMT_A8R8G8B8,
    D3DPOOL_DEFAULT, &Red, NULL) == S_OK)
    if( pDev->CreateTexture(8, 8, 1, 0, D3DFMT_A8R8G8B8,
    D3DPOOL_SYSTEMMEM, &pTx, NULL) == S_OK)
    if( pTx->LockRect( 0, &d3dlr, 0, D3DLOCK_DONOTWAIT |
    D3DLOCK_NOSYSLOCK ) == S_OK )
    {
    for(UINT xy=0; xy < 8*8; xy++)
    ((PDWORD)d3dlr.pBits)[xy] = 0xFF00FF00;

    pTx->UnlockRect( 0 );
    pDev->UpdateTexture( pTx, Red );
    pTx->Release();
    }

    if( pFont == NULL )
    D3DXCreateFontA( pDev, 16, 0, 650, 0, 0, 1, 0,
    0, DEFAULT_PITCH | FF_DONTCARE, "Comic Sans", &pFont );

    sprintf( strbuff, "\nXpsBlackHat\n\nCreated : JuwendiVB\n\nNum of Textures: %i\nStride: %i\nBase Tex Num: %i\n\nSTRIDE LOGGER V1\n\n" \
    "Log Enable: %i\n\nNUMPAD1: Stride++\nNUM2: Stride--\nNUMPAD3: BaseTexNum++" \
    "\nNUMPAD4: BaseTexNum--\nNUMPAD0: Log On/Off", \
    BASETEX.size(), iStride, iBaseTex + 1, Startlog );

    if( pFont )
    pFont->DrawTextA( 0, strbuff, -1, &FRect,
    DT_CENTER|DT_NOCLIP, 0xFF00FF00);

    if( GetAsyncKeyState( VK_NUMPAD1 ) &1 )
    {iStride++;BASETEX.clear();iBaseTex = 0;}

    if( GetAsyncKeyState( VK_NUMPAD2 ) &1 )
    if( iStride > 0 )
    {iStride--;BASETEX.clear();iBaseTex = 0;};

    if( GetAsyncKeyState( VK_NUMPAD3 ) &1 )
    if(iBaseTex < BASETEX.size() - 1)iBaseTex++;

    if( GetAsyncKeyState( VK_NUMPAD4 ) &1 )
    if( iBaseTex > 0 )
    iBaseTex--;

    if( GetAsyncKeyState( VK_NUMPAD0 ) &1 )
    {Startlog = !Startlog;STRIDE.clear();}

    return oEndScene( pDev );
    }

    //-------------------------------------------------------------------

    HRESULT WINAPI nReset
    ( LPDIRECT3DDEVICE9 pDev,
    D3DPRESENT_PARAMETERS* PresP )
    {
    if( pFont ) {pFont->Release();pFont = NULL;}
    if( Red ) {Red->Release();Red = NULL;}

    return oReset( pDev, PresP );
    }

    //-------------------------------------------------------------------

    VOID WINAPI THREAD( )
    {
    while( pDev == NULL )
    Sleep( 100 );

    VTab[16] = dCrDev;
    VirtualProtect( (PVOID)&VTab[16], 4, Old, &Old );

    VTab = (PDWORD)*(PDWORD)pDev;

    *(PDWORD)&oEndScene = VTab[42];
    *(PDWORD)&oReset = VTab[16];
    *(PDWORD)&oDrawIdP = VTab[82];

    while( 1 )
    {
    VTab[42] = (DWORD)nEndScene;
    VTab[16] = (DWORD)nReset;
    VTab[82] = (DWORD)nDrawIdP;
    Sleep( 100 );
    }
    }

    //-------------------------------------------------------------------

    void __cdecl add_log (const char *fmt, ...)
    {
    if(ofile != NULL)
    {
    if(!fmt) { return; }

    va_list va_alist;
    char logbuf[256] = {0};

    va_start (va_alist, fmt);
    _vsnprintf (logbuf+strlen(logbuf),
    sizeof(logbuf) - strlen(logbuf), fmt, va_alist);
    va_end (va_alist);

    ofile << logbuf << endl;
    }
    }
    DWORD WINAPI LoopFunction(LPVOID param)
    {
    while (1) {

    if(GetAsyncKeyState(VK_HOME)&1)
    {
    DWORD Maho = (DWORD)GetModuleHandleA(COD);
    {
    if (Maho > 0) {
    Juwendivb = Maho + 0x266E76;
    Patch((void *)(Juwendivb),(void*)(PBYTE)Bypass2, 7);
    Sleep(100);
    Patch((void *)(Juwendivb),(void*)(PBYTE)Bypass, 7);
    }
    Sleep(10);
    }
    }
    }
    return (0);
    }
    //-------------------------------------------------------------------

    BOOL WINAPI DllMain( HMODULE hModule,
    DWORD dwReason, LPVOID lpReserved )
    {
    if( dwReason == DLL_PROCESS_ATTACH )
    {
    DisableThreadLibraryCalls( hModule );
    GetModuleFileNameA( hModule, dlldir, 320 );
    dlldir[strlen(dlldir)-3] = 0;
    strcat(dlldir,"txt");

    ofile.open(dlldir, ios::app);
    add_log("XpsBlackHat Logger\nCreated By : JuwendiVB\nPowered By : XpsBlackHat Team | Xps Team\nResult Logger :\n");

    pDx = Direct3DCreate9
    ( D3D_SDK_VERSION );

    if( pDx != NULL )
    {
    VTab = (PDWORD)*(PDWORD)pDx;
    pDx->Release();

    dCrDev = (DWORD)VTab[16];
    VirtualProtect( (PVOID)&VTab[16], 4, 0x40, &Old );

    VTab[16] = (DWORD)CREATEDEVICE;
    CreateThread(0, 0, LoopFunction, 0, 0, 0);
    CreateThread( NULL, NULL, (LPTHREAD_START_ROUTINE)
    THREAD, NULL, NULL, NULL );
    }
    }

    return TRUE;
    }

    /*================================================= ================================================== ===================
    Created By : JuwendiVB
    Tools : Stride Logger D3D .
    Function : Search Stride,NumVertice,PrimitiveCount
    Copyright : 28/02/2013
    ================================================== ================================================== ====================*/

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

    qq776789331 (05-20-2013)

  3. #2
    baby0414's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0
    how to use?>

  4. #3
    pebble's Avatar
    Join Date
    Apr 2012
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    1
    XShot Indo & XShot Thai Error Warning !!


    Attached Thumbnails Attached Thumbnails
    54fb0627d08e.jpeg  

    ad5f563ffb63.jpeg  

    Last edited by pebble; 03-07-2013 at 12:51 AM.

  5. The Following User Says Thank You to pebble For This Useful Post:

    jinhitam (03-07-2013)

  6. #4
    3sachhacker2012's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Location
    cambodia
    Posts
    23
    Reputation
    10
    Thanks
    120
    My Mood
    Amused
    need bypass anti dll

  7. #5
    Re-covery's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Location
    Recovery
    Posts
    11
    Reputation
    10
    Thanks
    14
    My Mood
    Dead
    GOOD JOB

  8. #6
    seladude's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    14
    Reputation
    10
    Thanks
    15
    My Mood
    Devilish
    can you compile it and upload because it takes long time to download C++ and i dont have one so please upload it

  9. #7
    baitxchenhai's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Posts
    30
    Reputation
    10
    Thanks
    2
    Compile To DLL or exe?

  10. #8
    asddcvbb's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    1
    Oh so hard ah

  11. #9
    phantomz's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    XXXXXXXXX
    Posts
    2
    Reputation
    10
    Thanks
    0
    Too many kids -_-

  12. #10
    yoelian's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0

    Question

    Should this be compiled as a dll? Then is it supposed to work as a "d3d9.dll" on the game folder or as an injected dll?
    Sorry i'm just a begginer in this d3d "hacking" world.

  13. #11
    CleoX66's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    In front of my PC
    Posts
    53
    Reputation
    10
    Thanks
    101
    My Mood
    Bored
    I want learn to make treiner give me string or AOB for wallhack........pm thanks

  14. #12
    aditdewa11's Avatar
    Join Date
    Apr 2013
    Gender
    female
    Posts
    5
    Reputation
    10
    Thanks
    1
    My Mood
    Amazed
    aaaaaaaaaaaa

  15. #13
    Bong KKR's Avatar
    Join Date
    Apr 2013
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    Are You Crazy ??

  16. #14
    Vehrdyn's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Location
    House of house
    Posts
    8,543
    Reputation
    206
    Thanks
    5,531
    Code patched
    / closed

  17. The Following User Says Thank You to Vehrdyn For This Useful Post:

    Maroon5. (05-21-2013)

Similar Threads

  1. [Source Code] D3D Stride Logger 2013
    By GEHhgerhgerhgerhrhr in forum C++/C Programming
    Replies: 4
    Last Post: 03-04-2013, 06:20 PM
  2. [leech] stride logger d3d9 source
    By supercarz1991 in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 13
    Last Post: 09-06-2010, 08:24 PM
  3. [RELEASE] Stride Logger
    By J in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 47
    Last Post: 08-10-2010, 12:41 AM
  4. Replies: 6
    Last Post: 04-22-2010, 02:56 AM
  5. [Release] Stride Logger
    By [Jesuz] in forum K.O.S. Secret Operation Hacks
    Replies: 13
    Last Post: 01-30-2010, 12:30 AM

Tags for this Thread