hello there guys, i'm having this trouble you see, i need to make an anti dll injection so i tried all stuff in the world, even a new function AddSecureMemoryCacheCallback, but i ended up detouring loadlibrary, yeah don't blame me, my function is:
this is a valid function and returns false for any calling dll, so that injection fails,Code:const unsigned long kerneladdress = 0x7c801d7b; int sinject=0; CDetour Kernel__Detour; bool __stdcall Kernel__Hook(){ if(sinject < 1) { sinject++; Kernel__Detour.Ret(false); //prevents my own dll from not being injected } //MessageBoxA(0,"a","c",MB_OK); Kernel__Detour.Ret(false); return 0; void startdetours(HINSTANCE bModule) { Kernel__Detour.Detour((unsigned char*)kerneladdress,(unsigned char*)Kernel__Hook,true); Kernel__Detour.Apply(); return 1; } dllmain... //dll entrypoint stuff dllattach: startdetours(hModule); return true;
that address is from loadlibrarya, i thought of detouring createthreadex but in the end it was a bad idea.
what happens is that the process(theduel) crashes because i call the detouring too early, before the process has loaded a lot of another modules and another stuff which doesn't matter, if i change it to:
and addCode:CreateThread(0,0,(LPTHREAD_START_ROUTINE)startdetours,hModule,0,0); //now injection will be completed without calling the function at injection time
It would work perfectly, the problem is that people still can inject dll's when game is starting.Code:Sleep(12000);//time enough to the game start
ok now for another big problem, I've been programming my own client for my own server now, and i've done a lot of things althought i could not handle to change ZChatOuput color,
any inputing color i do it still displays on orange,
i even tried:
or tried the MCOLOR struct i saw in gunz dumpsCode:DWORD ncolor = D3DCOLOR_ARGB(255, 0, 0, 0); printf("%x\n",ncolor); //shows 0xff000000 ZChatOutput("balablab",2,0,ncolor); //or ZChatOutput("balablab",2,0,0xff000000);
but WHATEVER I DO, it still display orange, wth is wrong with gunz?Code:struct MCOLOR { BYTE A; BYTE R; BYTE G; BYTE B; } void ZChatOutput(char* msg,int btype,int loc,MCOLOR color) { __asm { MOV EAX, ZChatOutputAddress PUSH color PUSH loc PUSH btype PUSH msg CALL EAX } } void blablabla() { MCOLOR mclr; mclr.A = 255; mclr.R = 0; mclr.G = 0; mclr.B = 0; ZChatOutput("const char",2,0,mclr); }
how can i change zchatoutput color? @_@
I'm using 2007 client
thank for anyone who can help me!



Reply With Quote


