Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › MultiPlayer Game Hacks & Cheats › Combat Arms Hacks & Cheats › Combat Arms Hack Coding / Programming / Source Code › Combat Arms Coding Help & Discussion › detour

detour

Posts 1–15 of 18 · Page 1 of 2
BR
brohizi
detour
can anyone teach me how to make a detour or have a detour i can use?
#1 · 11y ago
Hacker Fail
Hacker Fail
Take a look in this section : Combat Arms BR Hack Coding/Source Code

Have a lot of detours posted
#2 · 11y ago
BR
brohizi
im getting so many errors... it says the arguments for getModuleHandle has to be lpcwstr but we r inputing a const char...

if( GetModuleHandle( "Kernel32.dll" ) != NULL
&& GetModuleHandle( "d3d9.dll" ) != NULL
&& GetModuleHandle( "Engine.exe" ) != NULL
&& GetModuleHandle( "CShell.dll" ) != NULL
&& GetModuleHandle( "Clientfx.fxd" ) != NULL )

i get error at all the underlined... im getting like 30 errors idk what to do

- - - Updated - - -

hey can you take a look at the code you sent me? i dont know how to fix the errors...
#3 · edited 11y ago · 11y ago
Hacker Fail
Hacker Fail
Quote Originally Posted by brohizi View Post
im getting so many errors... it says the arguments for getModuleHandle has to be lpcwstr but we r inputing a const char...

if( GetModuleHandle( "Kernel32.dll" ) != NULL
&& GetModuleHandle( "d3d9.dll" ) != NULL
&& GetModuleHandle( "Engine.exe" ) != NULL
&& GetModuleHandle( "CShell.dll" ) != NULL
&& GetModuleHandle( "Clientfx.fxd" ) != NULL )

i get error at all the underlined... im getting like 30 errors idk what to do

- - - Updated - - -

hey can you take a look at the code you sent me? i dont know how to fix the errors...
#4 · 11y ago
BR
brohizi
wow thank you

- - - Updated - - -

i still need to find a detour... i couldnt find one that wouldnt give me errors

- - - Updated - - -

tpresent becomes unidentified when i put a different detour in...
#5 · 11y ago
Hacker Fail
Hacker Fail
Quote Originally Posted by brohizi View Post
wow thank you

- - - Updated - - -

i still need to find a detour... i couldnt find one that wouldnt give me errors

- - - Updated - - -

tpresent becomes unidentified when i put a different detour in...
You are making something wrong, the detours posted don´t have errors
#6 · 11y ago
BR
brohizi
LPVOID DetourCreate(BYTE *src, CONST BYTE *dst, CONST INT len)
{
BYTE *jmp = (BYTE*)malloc(len + 5);
DWORD dwBack;
VirtualProtect(src, len, PAGE_READWRITE, &dwBack);
memcpy(jmp, src, len);
jmp += len;
jmp[0] = '\xE9';
*(DWORD*)(jmp + 1) = (DWORD)(src + len - jmp) - 5;

src[0] = '\x90';
src[1] = '\xD1';
src[2] = '\xC8';
src[3] = '\x85';
src[4] = '\xC0';
src[5] = '\xE9';

*(DWORD*)(&src[6]) = (DWORD)(dst - src) - 10;
for (INT i = 10; i < len; i++) src[i] = 0x90;
VirtualProtect(src, len, dwBack, &dwBack);

return (jmp - len);
}

LPVOID DetourCreate(BYTE *src, CONST BYTE *dst, CONST INT len)
{
BYTE *jmp = (BYTE*)malloc(len + 5);
DWORD dwBack;
VirtualProtect(src, len, PAGE_READWRITE, &dwBack);
memcpy(jmp, src, len);
jmp += len;
jmp[0] = '\xE9';
*(DWORD*)(jmp + 1) = (DWORD)(src + len - jmp) - 5;

src[0] = '\xD1';
src[1] = '\xC8';
src[2] = '\x85';
src[3] = '\xC0';
src[4] = '\x90';
src[5] = '\xE9';

*(DWORD*)(&src[6]) = (DWORD)(dst - src) - 10;
for (INT i = 10; i < len; i++) src[i] = 0x90;
VirtualProtect(src, len, dwBack, &dwBack);

return (jmp - len);
}

LPVOID DetourCreate(BYTE *src, CONST BYTE *dst, CONST INT len)
{
BYTE *jmp = (BYTE*)malloc(len + 5);
DWORD dwBack;
VirtualProtect(src, len, PAGE_READWRITE, &dwBack);
memcpy(jmp, src, len);
jmp += len;
jmp[0] = '\xE9';
*(DWORD*)(jmp + 1) = (DWORD)(src + len - jmp) - 5;

src[0] = '\xD1';
src[1] = '\xC8';
src[2] = '\x90';
src[3] = '\x85';
src[4] = '\xC0';
src[5] = '\xE9';

*(DWORD*)(&src[6]) = (DWORD)(dst - src) - 10;
for (INT i = 10; i < len; i++) src[i] = 0x90;
VirtualProtect(src, len, dwBack, &dwBack);

return (jmp - len);
}


this is the detour im using... i get errors... i just paste this in to the detour.h and build it but then it gives me errors about tpresent in main.cpp...
the only error i get in detour.h is: function 'LPVOID DetourCreate(BYTE *,const BYTE *,const INT)' already has a body line 30
#7 · 11y ago
Hacker Fail
Hacker Fail
You already have a detours with name DetourCreate
Just rename do DetourCreate2, DetourCreate3..
#8 · 11y ago
BR
brohizi
more errors!!

term does not evaluate to a function taking 5 arguments line 100
syntax error : missing ';' before identifier 'DetourCreate' line 105
syntax error : missing ';' before identifier 'oPresent' line 12
'DeviceIndex': identifier not found 105
missing type specifier - int assumed. Note: C++ does not support default-int line 12
expected a ';' 105
identifier "tPresent" is undefined line 12
identifier "tPresent" is undefined line 105

code:

#include "others.h"
#include "detours.h"

int names, cross, caixa, distance, kill;

bool nxchams, menu = true;

tPresent oPresent;

VOID MEMCPY( LPVOID ADDR, LPVOID byte, INT size )
{
DWORD dwBack;
VirtualProtect( ( LPVOID )ADDR, size, PAGE_EXECUTE_READWRITE, &dwBack );
memcpy( ( LPVOID )ADDR, byte, size );
VirtualProtect( ( LPVOID )ADDR, size, dwBack, &dwBack );
}

VOID StartFont( LPDIRECT3DDEVICE9 pDevice )
{
if( Font )
{
Font->Release();
Font = NULL;
}

if( !Font )
{
D3DXCreateFont( pDevice,
14,
0,
FW_BOLD,
1,
0,
DEFAULT_CHARSET,
OUT_DEFAULT_PRECIS,
DEFAULT_QUALITY,
DEFAULT_PITCH | FF_DONTCARE,
"Arial",
&Font );
}
}

void Funcs(LPDIRECT3DDEVICE9 pDevice)
{
AddKey (VK_F5, names);
AddKey (VK_F6, caixa);
AddKey (VK_F7, distance);
AddKey (VK_F8, cross);
AddKey (VK_F9, kill);

TeleKillFull(kill, pDevice);

Esp(caixa, distance, names, pDevice);

if (cross)
{
D3DVIEWPORT9 Viewport;
pDevice->GetViewport(&Viewport);
DrawBox(Viewport.Width / 2 - 23, Viewport.Height / 2, 50, 5, TBlack,TBlack, pDevice);
DrawBox(Viewport.Width / 2, (Viewport.Height / 2) - 23, 5, 50,TBlack,TBlack, pDevice);
}
}

void Menu(LPDIRECT3DDEVICE9 pDevice)
{

Funcs(pDevice);

if (GetAsyncKeyState(VK_INSERT)&1)
menu =! menu;

if ( menu )
{
DrawBox(PosX,PosY - 5,105,20,TBlack,Red,pDevice); // title
WriteText( pDevice, PosX + 14, PosY, Red, "Coder.Fail v0.1");

DrawBox(PosX,PosY + 20,105,115,TBlack,Red,pDevice); // menu

AddItem("Box", caixa, 0, pDevice);
AddItem("Distance", distance, 15, pDevice);
AddItem("Names", names, 30, pDevice);
AddItem("CrossHair", cross, 45, pDevice);
AddItem("TeleKill", kill, 60, pDevice);
}
}

HRESULT WINAPI hkPresent(LPDIRECT3DDEVICE9 pDevice, const RECT *a, const RECT *b, HWND c, const RGNDATA *d)
{
{
StartFont(pDevice);
pDrawPrimitive = *(CILTDrawPrim **)DrawPrimitive;

Menu(pDevice);
}

return oPresent(pDevice, a, b, c, d);
}

VOID Hook(void)
{
oPresent = (tPresent) DetourCreate((BYTE*) DeviceIndex(17), (BYTE*) hkPresent, 10);
}

bool IsGameReady( void )
{
if( GetModuleHandle( "Kernel32.dll" ) != NULL
&& GetModuleHandle( "d3d9.dll" ) != NULL
&& GetModuleHandle( "Engine.exe" ) != NULL
&& GetModuleHandle( "CShell.dll" ) != NULL
&& GetModuleHandle( "Clientfx.fxd" ) != NULL )
return true;

return false;
}

DWORD WINAPI Bypass( LPVOID lpArgs )
{

while( memcmp( ( CONST VOID * )ADDR_BYPASS, ( CONST VOID * )"\x0F\x84\xB4\x00\x00\x00", 6 ) != 0 )
Sleep(100);

MEMCPY( ( LPVOID )ADDR_BYPASS, "\xE9\x19\x01\x00\x00\x90", 6 );

while( !IsGameReady() )
Sleep( 25 );

Hook();

return 0;
}

BOOL WINAPI DllMain( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
if( dwReason == DLL_PROCESS_ATTACH )
{
DisableThreadLibraryCalls( hDll );
MessageBox( 0, "Simple CANA", "CombatArms", 0 );
CreateThread( 0, 0, (LPTHREAD_START_ROUTINE)&Bypass, 0, 0, 0 );
}

return TRUE;
}
#9 · 11y ago
Hacker Fail
Hacker Fail
Man, learn a basic of c++
#10 · 11y ago
BR
brohizi
i have learned
#11 · 11y ago
Hacker Fail
Hacker Fail
Quote Originally Posted by brohizi View Post
i have learned
Learn more, if you know a basic of c++, you solve it all
#12 · 11y ago
BR
brohizi
i solved it all but it crashed when i injected it...
#13 · 11y ago
Hacker Fail
Hacker Fail
Quote Originally Posted by brohizi View Post
i solved it all but it crashed when i injected it...
If the hack crashed, you didn´t solved
#14 · 11y ago
BR
brohizi
well... time to search

- - - Updated - - -

idk what to do... how do i fix?
#15 · edited 11y ago · 11y ago
Posts 1–15 of 18 · Page 1 of 2

Post a Reply

Similar Threads

  • coding detour?By laserdude45 in C++/C Programming
    3Last post 18y ago
  • DetourBy HackingIsMyLife in Programming Tutorial Requests
    0Last post 18y ago
  • [Realease-Test]Detours TestBy Kung Fu Penguin31 in WarRock - International Hacks
    16Last post 18y ago
  • Detour problemBy juppeli in WarRock - International Hacks
    4Last post 18y ago
  • Detouring MPGH Filters Will Result In A Ban.By radnomguywfq3 in Combat Arms Hacks & Cheats
    0Last post 17y ago

Tags for this Thread

None