PDA

View Full Version : Help with my Detaur



Fragment
05-12-2008, 09:52 PM
Yeah. I sorta got it to work, but sorta didn't. By that I mean, The moment I entered the game, I got an account ban for PBHACK.

I also have another question after this one... Scroll down

DWORD PbclBase;
HANDLE hProcess;

typedef int (__stdcall* TPBMemcheck) (int, size_t, int);

TPBMemcheck PBMemcheck;

int ModMemcheck(int a, size_t b, int c)
{
HacksOff();
return PBMemcheck(a, b, c);
HacksOn();

}
//in DLLMain
PbclBase = (DWORD)GetModuleHandle("pbcl.dll");
if (dwReason == DLL_PROCESS_ATTACH)
{
hProcess = GetCurrentProcess();
PBMemcheck = (TPBMemcheck)DetourFunction( ( BYTE * )( PbclBase + 0x55FC5 ), ( BYTE * )ModMemcheck);
}
So what did I do wrong?

-------------Question 2:
How do I detour a DLL?

I'm using a d3d starter kit, since I don't feel like making my own at the moment, and every few minutes it kicks me for Disallowed Program/Driver; even when no hacks are on. How would I fix this?

ganglyman21
05-13-2008, 03:56 AM
It's detecting something wrong with the warrock exe. Like its a different size, or it scans whats inside. It isn't detecting mem hacks, so I think you need to find a new/different check that it runs. Havent looked much at detouring yet so I'm not 100% on this.

masterboy
05-13-2008, 08:04 AM
About Dllmain you need to put it in there

Here is the start of the function,it should be in main.cpp


bool WINAPI DllMain(HMODULE hDll, DWORD dwReason, PVOID pvReserved)
{
if(dwReason == DLL_PROCESS_ATTACH)
{


And you detour code is just a part of it because u need another part to get it 100% working

Fragment
05-13-2008, 02:03 PM
About Dllmain you need to put it in there

Here is the start of the function,it should be in main.cpp


bool WINAPI DllMain(HMODULE hDll, DWORD dwReason, PVOID pvReserved)
{
if(dwReason == DLL_PROCESS_ATTACH)
{


And you detour code is just a part of it because u need another part to get it 100% working

I know. I put that in the DLL main that's why it says //in dll main above it it's because I didn't feel like copy pasting that code in there cause I was bored. What other part are you talking about?

masterboy
05-13-2008, 02:42 PM
int __cdecl Check(int, size_t, char *);
int __stdcall Detour(int);


Some of these? and u need a int cdecl check in dllmain or it won't work

Hans211
05-19-2008, 01:45 AM
Yeah. I sorta got it to work, but sorta didn't. By that I mean, The moment I entered the game, I got an account ban for PBHACK.

I also have another question after this one... Scroll down

DWORD PbclBase;
HANDLE hProcess;

typedef int (__stdcall* TPBMemcheck) (int, size_t, int);

TPBMemcheck PBMemcheck;

int ModMemcheck(int a, size_t b, int c)
{
HacksOff();
return PBMemcheck(a, b, c);
HacksOn();

}
//in DLLMain
PbclBase = (DWORD)GetModuleHandle("pbcl.dll");
if (dwReason == DLL_PROCESS_ATTACH)
{
hProcess = GetCurrentProcess();
PBMemcheck = (TPBMemcheck)DetourFunction( ( BYTE * )( PbclBase + 0x55FC5 ), ( BYTE * )ModMemcheck);
}
So what did I do wrong?

-------------Question 2:
How do I detour a DLL?

I'm using a d3d starter kit, since I don't feel like making my own at the moment, and every few minutes it kicks me for Disallowed Program/Driver; even when no hacks are on. How would I fix this?

2 answers:
- PB is checking their pbcl.dll for hooks, so the above will be detected and you get a PBHACK error (they started doing this since a day or 10)

- Same as above, PB is checking also the D3D for hooks, so you get a disallowed Program/Driver

Fragment
05-20-2008, 09:13 PM
2 answers:
- PB is checking their pbcl.dll for hooks, so the above will be detected and you get a PBHACK error (they started doing this since a day or 10)

- Same as above, PB is checking also the D3D for hooks, so you get a disallowed Program/Driver

So does that mean that there is no hope?

purple
05-22-2008, 03:27 AM
no there is hope, because hans123 already got it working. ********** and ghb got its vip bypassing pb again.
i cant tell u how it works, but i can tell u that my parameters from the 55FC5 function are others than yours...

Gordon
05-22-2008, 05:11 AM
int ModMemcheck(int a, size_t b, int c)
{
HacksOff();
return PBMemcheck(a, b, c);
HacksOn();

}

where is the logical error? right, the return. the function HacksOn doesnt get called.

and remove on call the detour, call the original check func and apply the detour.

olie122333
06-03-2008, 10:45 AM
would the code above work with a detour ?


EDIT: --> This is a detour, i mean bypass.

hhawker31
06-15-2008, 02:19 PM
DWORD PbclBase;
HANDLE hProcess;

typedef int (__stdcall* TPBMemcheck) (int, size_t, int);

TPBMemcheck PBMemcheck;

int ModMemcheck(int a, size_t b, int c)
{
HacksOff();
return PBMemcheck(a, b, c);
HacksOn();

}
//in DLLMain
PbclBase = (DWORD)GetModuleHandle("pbcl.dll");
if (dwReason == DLL_PROCESS_ATTACH)
{
hProcess = GetCurrentProcess();
PBMemcheck = (TPBMemcheck)DetourFunction( ( BYTE * )( PbclBase + 0x55FC5 ), ( BYTE * )ModMemcheck);
}
So what did I do wrong?



for your ModMemcheck() function try this:

int ModMemcheck(int a, size_t b, int c)
{
int iReturn;
HacksOff();
iReturn = PBMemcheck(a, b, c);
HacksOn();

return iReturn;

}

Gordon
06-17-2008, 12:01 AM
should give you a acc ban, if you do it like hhawker31 says.

hhawker31
06-18-2008, 02:19 PM
why will it give an account ban?