Descriere: Cu acest plug-in puteti scapa de exploit-ul care va 'afla' parola rcon si va adauga un 'owner' in user.ini, deoarece acest plug-in schimba parola rcon la un interval de timp.
Plugin: Protection RCON
Versiunea: 0.0.3
Autor: LooksGood
ChangeLog:
Cod:
v0.0.1 - prima lansare
v0.0.2 - rescriere cod
- optimizare cod
- adaugare cvar-uri
v0.0.3 - adaugare nou cvar "rcon_protection_usemod"
- adaugare nou cvar "rcon_protection_setmod"
- adaugare posiblitate sa-ti setezi mod-ul schimbari parolei
- adaugare o noua metoda de schimbare a parolei rcon.
- adaugare comanda "amx_set_rconpassword"
Cvar-uri
rcon_protection_refresh "timp" - intervalul de timp in care parola rcon se schimba [5 secunde valoarea initiala]
rcon_protection_onoff "1/0" - 0 = plugin-ul numai functioneaza / 1 = plugin-ul functioneaza [ 1 valoarea initiala]
rcon_protection_usemod "0/1/2" - 0 = nu se mai schimba parola / 1 = se schimba folosind cifre random / 2 - selectati voi parola [ 2 valoarea initiala]
rcon_protection_setmod "0/1" - 1 = seteaza "rcon_protection_usemod" pe 0 / 0 - nu seteaza nimic.
Comenzi ( consola & chat )
[ consola ] amx_set_rconpassword < password > - setezi parola rcon a server-ului
Source:
Cod:
#include < amxmodx >
#include < amxmisc >
#define PLUGIN_NAME "Protection RCON"
#define PLUGIN_VERSION "0.0.3"
#define PLUGIN_AUTHOR "LookgsGood"
new RCON_RefreshDelay, RCON_OnOff, RCON_UseMod, RCON_SetMod
new const szRCON[9][] =
{
"a88a33d4cv3Gh33QQ975Ee3912",
"a33a99D4cv3gH23ZQ975Ee3910",
"a88a33d4cv3Gh33Q975eE2DZ11",
"a9999DDvH3Gh22ZW975Ee39WWW",
"AAAAAAAAA66WWWWWWWWWZZE555",
"WWWWWWWWWWW2222AAAAZX5FCWW",
"bvcdDSA48923Z54C51E356dfwW",
"bvcdDSA48923Z54C51E#C!@#C$",
"@:#O!MCL!@KJ#N!@C#@!C#!@#C"
}
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
RCON_RefreshDelay = register_cvar("rcon_protection_refresh", "5.0")
RCON_OnOff = register_cvar("rcon_protection_onoff", "1")
RCON_UseMod = register_cvar("rcon_protection_usemod", "2")
RCON_SetMod = register_cvar("rcon_protection_setmod", "0")
register_concmd("amx_set_rconpassword", "SetRCONPassword", ADMIN_RCON, "< password > - set rcon password")
set_task(get_pcvar_float(RCON_RefreshDelay), "RCON_RefreshPassword", _, _, _, "b")
}
public RCON_RefreshPassword(id)
{
if(get_pcvar_num(RCON_OnOff) == 1)
{
if(get_pcvar_num(RCON_UseMod) == 1)
{
new rcon_protection_password = get_cvar_pointer("rcon_password") // FUCK COMPILER !!
new RCON_n_RandomNumber = (1111111, 9999999)
new RCON_s_RandomNumber[7] // Cate numere va contine parola O_o
num_to_str(RCON_n_RandomNumber, RCON_s_RandomNumber, 7)
set_pcvar_string(rcon_protection_password, RCON_s_RandomNumber)
}
else if(get_pcvar_num(RCON_UseMod) == 2)
{
new rcon_protection_password = get_cvar_pointer("rcon_password")
set_pcvar_string(rcon_protection_password, szRCON[random_num(0,
])
}
else if(get_pcvar_num(RCON_UseMod) == 0)
{
return PLUGIN_HANDLED
}
}
return PLUGIN_CONTINUE
}
public SetRCONPassword(id, level, cid)
{
if(!cmd_access(id, level, cid, 2))
{
return PLUGIN_HANDLED
}
if(get_pcvar_num(RCON_SetMod) == 1)
{
server_cmd("rcon_protection_usemod", "3")
return PLUGIN_HANDLED
}
new RCON_Args[128]
read_args(RCON_Args, 127)
server_cmd("%s", RCON_Args)
return PLUGIN_HANDLED
}