You could detour the function and just feed it empty string with dhooks.
PHP Code:
int __cdecl SendToServerConsole(const char *a1)
{
int (__cdecl *v1)(CBaseEntity *, int); // ebx
int v2; // eax
v1 = *(int (__cdecl **)(CBaseEntity *, int))(*(_DWORD *)engine + 148);
v2 = UTIL_VarArgs(off_BF2604, a1);
return v1(engine, v2);
}
Sigs
Linux:
Code:
_ZL19SendToServerConsolePKc
Windows:
Code:
\x55\x8B\xEC\x8B\x4D\x08\xA1\x2A\x2A\x2A\x2A\x2A\x8B
Not tested the sigs but i think windows is correct.
Why not just use this
https://forums.alliedmods.net/showthread.php?p=2662706 can do the job also.
__________________