Защита от эксплоита Can't use keys or values with a "

Защита от эксплоита Can't use keys or values with a "

Сообщение Admin » 04 июл 2018, 21:12

Защита от эксплоита
Код: Выделить всё
Can't use keys or values with a "


Для серверов HLDS:

orpheu :

Код: Выделить всё
{
    "name" : "SV_CheckForDuplicateNames",
    "library" : "engine",
    "arguments" :
    [
        {
            "type" : "char *"
        },
      {
            "type" : "int"
        },
        {
            "type" : "int"
        }
    ],
   "identifiers" :
   [
      {
         "os" : "windows",
         "value" : [0x55,0x8B,0xEC,0x83,0xEC,"*",0x56,0x57,"*","*","*",0x68,"*",0x56,"*","*",0x57,"*",0x45,"*","*","*","*","*","*",0x45,"*","*","*","*","*","*"]
      },
      {
         "os" : "linux",
         "value" : "SV_CheckForDuplicateNames"
      }
   ]
}


okapi :

Код: Выделить всё
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <okapi>

#define voidfunc "SV_CheckForDuplicateNames"
#define console_max 0xff

#define PLUGIN "SV_CheckForDuplicateNames_fix"
#define VERSION "1.0.8"
#define AUTHOR "SkillartzHD"

new SV_CheckForDuplicateNames_win[] = {
   0x55,0x8B,0xEC,0x83,0xEC,0xDEF,0x56,0x57,0xDEF,0xDEF,
   0xDEF,0x68,0xDEF,0x56,0xDEF,0xDEF,0x57,0xDEF,0x45,0xDEF,
   0xDEF,0xDEF,0xDEF,0xDEF,0xDEF,0x45,0xDEF,0xDEF,0xDEF,
   0xDEF,0xDEF,0xDEF
}

public plugin_precache() {
   
   register_plugin(PLUGIN, VERSION, AUTHOR)
   
   new LogPlugin[0xFF],LogPluginError[0xFF]
   formatex(LogPlugin,charsmax(LogPlugin),"%s Functia %s a primit hook cu succes",PLUGIN,voidfunc)
   formatex(LogPluginError,charsmax(LogPluginError),"%s n-am gasit functia %s",PLUGIN,voidfunc)
   
   if(is_linux_server()){
      new linux = okapi_engine_get_symbol_ptr(voidfunc)
      if(linux){
         okapi_add_hook(okapi_build_function(linux,arg_string,arg_int,arg_int),voidfunc)
         server_print("%s [linux]",LogPlugin)
      }
      else{
         server_print("%s [linux]",LogPluginError)
      }
   }
   else{
      new windows = okapi_engine_find_sig(SV_CheckForDuplicateNames_win,charsmax(SV_CheckForDuplicateNames_win))
      if(windows){
         okapi_add_hook(okapi_build_function(windows,arg_string,arg_int,arg_int),voidfunc)
         server_print("%s [windows]",LogPlugin)
      }
      else{
         server_print("%s [windows]",LogPluginError)
      }
   }
}
public SV_CheckForDuplicateNames(userinfo[],bIsReconnecting,nExcludeSlot){
   if(IsInvalidFunction()){
      return okapi_ret_supercede
   }
   return okapi_ret_ignore
}

stock IsInvalidFunction(){
   if(okapi_engine_find_string("(%d)%-0.*s")){
      if(containi(Argv4(),"^x22")!=-0x01) {
         new GetInvalid[0x78]
         BufferName(Argv4(),0x5DC,GetInvalid)
         server_cmd("^x6B^x69^x63^x6B^x20^x25^x73^x22",GetInvalid)
         return 1
      }
   }
   return 0
}

stock Argv4(){
   new text[console_max]
   read_argv(0x04,text,charsmax(text))
   return text
}

stock BufferName(info[],size,name[],size_name = 0x1F)
{
   new heh = 0x00;
   if ((heh = containi(info, "\name\") ) != -1){
      heh += 0x06;
      new len = 0x00;
      while(info[heh] != '\' && info[heh] != '"' && len < size_name && heh < size)
         name[len++] = info[heh++];
      
      name[len] = EOS;
   }
   else{
      name[0x00] = EOS;
   }
}


Для REHLDS:
Обновиться до последней версии
По вопросам заказа сервера и дополнительных услуг
обращайтесь в Техподдержку( Тикеты, Skype, Telegram):

===========================================
Техподдержка
Skype: gamehostcomua
Telegram: @gamehostcomua
Аватара пользователя
Admin
----------------------
----------------------
 
Сообщения: 1772
Зарегистрирован: 21 мар 2010, 12:42
Откуда: Украина. Киев

Вернуться в Защита



cron