Register for your free account! | Forgot your password?

Go Back   elitepvpers > Shooter > Soldier Front > Soldier Front Philippines
You last visited: Today at 02:18

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Tutorial]Creating D3D8 Base | Wallhack

Discussion on [Tutorial]Creating D3D8 Base | Wallhack within the Soldier Front Philippines forum part of the Soldier Front category.

Reply
 
Old   #1
 
Mαrrα's Avatar
 
elite*gold: 10
Join Date: Aug 2011
Posts: 3,816
Received Thanks: 1,835
[Tutorial]Creating D3D8 Base | Wallhack

INSTALLING VISUAL C++ 2008

LINK :
HOW-TO : Select Visual C++ 2008 Express Edition under Visual Studios 2008 Express and click Free Download

INSTALLING DIRECT-X SDK


LINK :
HOW-TO : Click download and install this SDK

ADDING DIRECT-X INCLUDE FILES IN VC++

STEP 1. Install Direct-X SDK
STEP 2. Open VC++
STEP 3. Select Tools -> Option -> Projects and Solutions -> VC++ Directories
STEP 4. In VC ++ Directories, go to the drop-down menu and select Include Files
STEP 5. Add the code below
Code:
C:\Program Files\Microsoft DirectX 9.0 SDK (Summer 2004)\Include
ADDING DIRECT-X LIBRARY FILES IN VC++

STEP 1. Install Direct-X SDK
STEP 2. Open VC++
STEP 3. Select Tools -> Option -> Projects and Solutions -> VC++ Directories
STEP 4. In VC ++ Directories, go to the drop-down menu and select Library Files
STEP 5. Add the code below
Code:
C:\Program Files\Microsoft DirectX 9.0 SDK (Summer 2004)\Lib
Here's a tutorial on how to create a d3d8 / Sudden attack base!

Open up Visual C++ 2008
Create: Project...
Choose Win32 Console Application
If you do not see it, look at Project types and click on Visual C++

Screenshot



You should see the picture below be presented on your Visual C++
Press NEXT

Screenshot



Do not touch anything else. Application type - Select "DLL"
Press FINISH

Screenshot



You should see the screenshot below presented on your Visual C++
Right click and remove dllmain.cpp*
* - Remove because it is already defined in the base source I will give you.

Screenshot



Click the green arrow on the top to debug / release. Alternately, you can just build / rebuild (for those who know how to use C++ IDE)

Screenshot



Base Source Code

Code:
#include "stdafx.h"
#include <windows.h>

#include <d3d8.h>
#pragma comment(lib, "d3d8.lib")

typedef HRESULT (WINAPI* CreateDevice_Prototype)        (LPDIRECT3D8, UINT, D3DDEVTYPE, HWND, DWORD, D3DPRESENT_PARAMETERS*, LPDIRECT3DDEVICE8*);
typedef HRESULT (WINAPI* Reset_Prototype)               (LPDIRECT3DDEVICE8, D3DPRESENT_PARAMETERS*);
typedef HRESULT (WINAPI* EndScene_Prototype)            (LPDIRECT3DDEVICE8);
typedef HRESULT (WINAPI* DrawIndexedPrimitive_Prototype)(LPDIRECT3DDEVICE8, D3DPRIMITIVETYPE, UINT, UINT, UINT, UINT);

CreateDevice_Prototype         CreateDevice_Pointer         = NULL;
Reset_Prototype                Reset_Pointer                = NULL;
EndScene_Prototype             EndScene_Pointer             = NULL;
DrawIndexedPrimitive_Prototype DrawIndexedPrimitive_Pointer = NULL;

HRESULT WINAPI Direct3DCreate8_VMTable    (VOID);
HRESULT WINAPI CreateDevice_Detour        (LPDIRECT3D8, UINT, D3DDEVTYPE, HWND, DWORD, D3DPRESENT_PARAMETERS*, LPDIRECT3DDEVICE8*);
HRESULT WINAPI Reset_Detour               (LPDIRECT3DDEVICE8, D3DPRESENT_PARAMETERS*);
HRESULT WINAPI EndScene_Detour            (LPDIRECT3DDEVICE8);
HRESULT WINAPI DrawIndexedPrimitive_Detour(LPDIRECT3DDEVICE8, D3DPRIMITIVETYPE, UINT, UINT, UINT, UINT);

PDWORD Direct3D_VMTable = NULL; 

BOOL WINAPI DllMain(HINSTANCE hinstModule, DWORD dwReason, LPVOID lpvReserved)
{
  if(dwReason == DLL_PROCESS_ATTACH)
  {
    DisableThreadLibraryCalls(hinstModule);

    if(Direct3DCreate8_VMTable() == D3D_OK)
    return TRUE;
  }

  return FALSE;
}

HRESULT WINAPI Direct3DCreate8_VMTable(VOID)
{
  LPDIRECT3D8 Direct3D_Object = Direct3DCreate8(D3D_SDK_VERSION);

  if(Direct3D_Object == NULL)
  return D3DERR_INVALIDCALL;
  
  Direct3D_VMTable = (PDWORD)*(PDWORD)Direct3D_Object;
  Direct3D_Object->Release();

  DWORD dwProtect;

  if(VirtualProtect(&Direct3D_VMTable[15], sizeof(DWORD), PAGE_READWRITE, &dwProtect) != 0)
  {
    *(PDWORD)&CreateDevice_Pointer = Direct3D_VMTable[15];
    *(PDWORD)&Direct3D_VMTable[15] = (DWORD)CreateDevice_Detour;

    if(VirtualProtect(&Direct3D_VMTable[15], sizeof(DWORD), dwProtect, &dwProtect) == 0)
    return D3DERR_INVALIDCALL;
  }
  else
  return D3DERR_INVALIDCALL;

  return D3D_OK;
}

HRESULT WINAPI CreateDevice_Detour(LPDIRECT3D8 Direct3D_Object, UINT Adapter, D3DDEVTYPE DeviceType, HWND FocusWindow, 
					DWORD BehaviorFlags, D3DPRESENT_PARAMETERS* PresentationParameters, 
					LPDIRECT3DDEVICE8* Returned_Device_Interface)
{
  HRESULT Returned_Result = CreateDevice_Pointer(Direct3D_Object, Adapter, DeviceType, FocusWindow, BehaviorFlags, 
	                                          PresentationParameters, Returned_Device_Interface);

  DWORD dwProtect;

  if(VirtualProtect(&Direct3D_VMTable[15], sizeof(DWORD), PAGE_READWRITE, &dwProtect) != 0)
  {
    *(PDWORD)&Direct3D_VMTable[15] = *(PDWORD)&CreateDevice_Pointer;
    CreateDevice_Pointer           = NULL;

    if(VirtualProtect(&Direct3D_VMTable[15], sizeof(DWORD), dwProtect, &dwProtect) == 0)
    return D3DERR_INVALIDCALL;
  }
  else
  return D3DERR_INVALIDCALL;

  if(Returned_Result == D3D_OK)
  {
    Direct3D_VMTable = (PDWORD)*(PDWORD)*Returned_Device_Interface;

    *(PDWORD)&Reset_Pointer                = (DWORD)Direct3D_VMTable[14];
    *(PDWORD)&EndScene_Pointer             = (DWORD)Direct3D_VMTable[35];
    *(PDWORD)&DrawIndexedPrimitive_Pointer = (DWORD)Direct3D_VMTable[71];

    *(PDWORD)&Direct3D_VMTable[14] = (DWORD)Reset_Detour;
    *(PDWORD)&Direct3D_VMTable[35] = (DWORD)EndScene_Detour;
    *(PDWORD)&Direct3D_VMTable[71] = (DWORD)DrawIndexedPrimitive_Detour;
  }
    
  return Returned_Result;
}

HRESULT WINAPI Reset_Detour(LPDIRECT3DDEVICE8 Device_Interface, D3DPRESENT_PARAMETERS* PresentationParameters)
{
  return Reset_Pointer(Device_Interface, PresentationParameters);
}

HRESULT WINAPI EndScene_Detour(LPDIRECT3DDEVICE8 Device_Interface)
{
  return EndScene_Pointer(Device_Interface);
}

HRESULT WINAPI DrawIndexedPrimitive_Detour(LPDIRECT3DDEVICE8 Device_Interface, D3DPRIMITIVETYPE Type, 
                                           UINT MinIndex, UINT NumVertices, UINT StartIndex, UINT PrimitiveCount)
{
  LPDIRECT3DVERTEXBUFFER8 Stream_Data;
  UINT Stride = 0;

  if(Device_Interface->GetStreamSource(0, &Stream_Data, &Stride) == D3D_OK)
  Stream_Data->Release();
  //code
  return DrawIndexedPrimitive_Pointer(Device_Interface, Type, MinIndex, NumVertices, StartIndex, PrimitiveCount);
}
How to add WALLHACK
Look at this piece of code right here in the base

Code:
HRESULT WINAPI DrawIndexedPrimitive_Detour(LPDIRECT3DDEVICE8 Device_Interface, D3DPRIMITIVETYPE Type, 
                                           UINT MinIndex, UINT NumVertices, UINT StartIndex, UINT PrimitiveCount)
{
  LPDIRECT3DVERTEXBUFFER8 Stream_Data;
  UINT Stride;

  if(Device_Interface->GetStreamSource(0, &Stream_Data, &Stride) == D3D_OK)
  Stream_Data->Release();
  //code
  return DrawIndexedPrimitive_Pointer(Device_Interface, Type, MinIndex, NumVertices, StartIndex, PrimitiveCount);
}
Now, look more closely at the following.
Code:
//code
INFO
Stride 40 and 44 are the body model of Sudden Attack. (One's upper, one's lower)
WALL HACK ---
Add this below the "//code"
Code:
bool wallhack;
if(Stride == 40 && wallhack || Stride == 44 && wallhack)
{
   Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
}
To make this work, you need to add a hotkey.

Add this below the wallhack code.
Code:
if ((GetAsyncKeyState(VK_NUMPAD1)&1) == 1) //Numpad 1
     wallhack = !wallhack;//Start Wallhack
If you press NUMPAD 1, wallhack will start.


Credits:
Voltage552
Match*Star.
Mαrrα is offline  
Thanks
3 Users
Old 10/17/2012, 08:02   #2
 
elite*gold: 0
Join Date: Jun 2011
Posts: 2
Received Thanks: 0
after you have the dll code done how do u inject it?
takechi1 is offline  
Old 10/17/2012, 14:26   #3
 
Mαrrα's Avatar
 
elite*gold: 10
Join Date: Aug 2011
Posts: 3,816
Received Thanks: 1,835
Quote:
Originally Posted by takechi1 View Post
after you have the dll code done how do u inject it?
You will compile it and you can inject it using an injector.
Mαrrα is offline  
Old 10/22/2012, 16:34   #4
 
elite*gold: 0
Join Date: Apr 2012
Posts: 17
Received Thanks: 1
Hi marra, CAn u make wallhack in specialforce dfi and teach me how to compile i know you are a good coder i this section Please O.O

because im new to c++ i dont know how to get the code of sf please i need chams source code only...
jeff14 is offline  
Old 10/28/2012, 04:49   #5
 
elite*gold: 0
Join Date: Apr 2011
Posts: 8
Received Thanks: 0
where do i fine the dll hack after i made one???

doesent work
cina08 is offline  
Old 10/28/2012, 14:39   #6
 
Mαrrα's Avatar
 
elite*gold: 10
Join Date: Aug 2011
Posts: 3,816
Received Thanks: 1,835
This tutorial is for people who wanna learn how to make a d3d8 base.
And who has the knowledge who want to create their own.
This doesn't mean that after you compile this is it's already working or detected.

Note: This is a tutorial only and not a working hack.
Mαrrα is offline  
Thanks
1 User
Old 11/02/2012, 18:35   #7
 
elite*gold: 0
Join Date: Oct 2011
Posts: 4
Received Thanks: 1
Thanks ^_^ this one is what I need xD

Quote:
Originally Posted by Mαrrα View Post
This tutorial is for people who wanna learn how to make a d3d8 base.
And who has the knowledge who want to create their own.
This doesn't mean that after you compile this is it's already working or detected.

Note: This is a tutorial only and not a working hack.
well, you know how to make it working right? I kinda needing some info about this kind of stuff ^_^
HaloRan is offline  
Reply


Similar Threads Similar Threads
[TUTORIAL] Creating a simple DLL Cheat/Hack
07/12/2021 - Kal Hacks, Bots, Cheats & Exploits - 162 Replies
HOW TO CREATE YOUR OWN DLL HACK Hello guys, In recent days, I recieved many questions about how to use the pointers posted in one specific thread. So here is guide for creating the basic Proxy-DLL skeleton + hack. I will try to explain it to details. Requirements 1] Some C++ and UCE (memory and such stuff) knowladge 2] Some Time
[Navicat Tutorial] Creating Vendors [English]
08/03/2010 - WoW Private Server - 4 Replies
Welcome to my first tutorial I will teach you hwo you can create your own vendors here. Open Notepad and isert the text. Code: INSERT INTO `creature_names` (`entry`,`name`,`subname`,`info_str`,`type`,`spell dataid`,`male_displayid`,`female_displayid`,`civil ian`,`leader`) VALUES ('<Your vendors id>',"<Your Vendors Name>",'','<your vendors guild name>','10','0','<your vendor's display id>','0','0','0') INSERT INTO `creature_proto`...
[Ultimate Release] D3D8 Base WITH MENU!
01/19/2010 - WarRock Hacks, Bots, Cheats & Exploits - 41 Replies
It's private now.
Pls somebody a complete tutorial for Creating Pserver from start to end.
04/19/2009 - Dekaron Private Server - 19 Replies
Every time I start to make a Pserver I've some errors. Sometimes at SQL server install, sometimes at Apache... Someone pls write a complete tutorial: How can someone make a working Pserver with SQL install, database backup, querys, IP settings, server rate settings, account creation in SQL, account creation with php (inc. apache install, settings) and starting the server (dbmon, cast... and client edit in winhex). Thx, sry 4 my poor eng.
[Tutorial]Creating a notepad app[Lot of Text]
11/23/2008 - CO2 Programming - 15 Replies
Create a Notepad App In this tutorial I will show you how you can create your own Notepad like Application. Start by creating a new Windows Forms Application. Now we can add some controls. The first control will be a MenuStrip. After that right click on the newly created menustrip, Select Insert Standard Items. Delete the Tools menu and the Help menu. Delete the Redo menu item from the Edit menu. Now drag and drop a TextBox onto the form.



All times are GMT +1. The time now is 02:19.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.