[FilterScript] [FS]Rcon Protector
#10

Quote:
Originally Posted by jake08
Посмотреть сообщение
why dony you all make a script to where if they get he password wrong 2-3 times it auto bans them that way there will be no effect of the attack. This way RCON is still usable.
Quote:
Originally Posted by kc
Посмотреть сообщение
i am not aware of any way to do this.. no callback like RconPassFail(playerid) so i dont see any logical way to do this at the moment.
how about !success and using a variable?

pawn Код:
new FailedRconAttempt[MAX_PLAYERS];//

//------------------------------------------------------------------------------
public OnPlayerConnect(playerid)
{
    FailedRconAttempt[playerid] = 0;//
}

//------------------------------------------------------------------------------
public OnRconLoginAttempt(ip[], password[], success)
{
    if(!success)//failed password
    {
        new failstring[128], playersip[16], playername[MAX_PLAYER_NAME];//
        printf("[CONSOLE]: Failed RCON Login Attemp on IP:[ %s ] Using The Password:[ %s ]",ip, password);
        for(new i=0; i<MAX_PLAYERS; i++)
        {
            GetPlayerIp(i, playersip, sizeof(playersip));//
            if(!strcmp(ip, playersip, true))
            {
                FailedRconAttempt[i] ++;//adds 1
                if(FailedRconAttempt[i] < 3)
                {
                    format(failstring, sizeof(failstring), "<| Incorrect Password, Failed Attempts:[ %d ] |>", FailedRconAttempt[i]);//
                    SendClientMessage(i,0xAFAFAFAA, failstring);//
                    return 1;
                }
                GetPlayerName(i, playername, sizeof(playername));//
                format(failstring, sizeof(failstring), "<| %s was banned, reason: FAILED RCON PASSWORD |>", playername);//
                SendClientMessageToAll(0xAFAFAFAA, failstring);//
                format(failstring, sizeof(failstring), "<| THE FAILED RCON PASSWORD WAS: [ %s ] |>", password);//failed password
                SendClientMessageToAll(0xAFAFAFAA, failstring);//
                Ban(i);//
                Kick(i);//
            }
        }
    }
    return 1;
Reply


Messages In This Thread
[FS]Rcon Protector - by kc - 05.01.2008, 18:02
Re: [FS]Rcon Protector - by snipe69 - 05.01.2008, 18:14
Re: [FS]Rcon Protector - by ReX - 05.01.2008, 18:15
Re: [FS]Rcon Protector - by kc - 05.01.2008, 20:07
Re: [FS]Rcon Protector - by jake08 - 05.01.2008, 20:12
Re: [FS]Rcon Protector - by kc - 05.01.2008, 20:34
Re: [FS]Rcon Protector - by Antironix - 05.01.2008, 21:07
Re: [FS]Rcon Protector - by kc - 06.01.2008, 09:31
Re: [FS]Rcon Protector - by [Z]Sahtiyan - 23.02.2009, 10:07
Re: [FS]Rcon Protector - by Killa[DGZ] - 05.10.2011, 11:10

Forum Jump:


Users browsing this thread: 1 Guest(s)