View Single Post
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 09-05-2019 , 15:39   Re: Preventing Vscript from using "SendToServerConsole"?
Reply With Quote #2

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_BF2604a1);
  return 
v1(enginev2);

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.
__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D
Lux is offline