How to prevent rcon crack ?
#4

Quote:
Originally Posted by Chaprnks
Посмотреть сообщение
Best failsafe for me:

server.cfg
Код:
rcon 0
rcon_password TAzADG3q6AH0UW0HPkfHi0YwSfhE7WsJ
This disables remote RCON (without being in-game) & you should also add punishment for XX failed logins in-game:




pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    if(!success) BlockIpAddress(ip, 60000);
    return 1;
}
This blocks the player from the server for 1 minute when he enters a wrong RCON password. Don't worry, it auto unblocks him after 60 seconds.
Oh thank you very much I appreciate that :P
but I'm wondering if I can completely disable that Rcon login.
(you get kicked if you type whether correct or incorrect password) But thx anyway :P


I did something hopefully it's ok(below at else if)

Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    if(!success)
    {
        new pip[16],string[256],name[25];
        foreach(Player, i)
        {
            GetPlayerIp(i, pip, sizeof(pip));
            if(!strcmp(ip, pip, true))
           	{
				GetPlayerName(i, name, sizeof(name));
		        format(string,sizeof(string),"Notice: {FFFFFF}%s has entered a wrong rcon password (IP: %s).",name,ip);
                ABroadCast(COLOR_RED2,string,3);
                Kick(i);
                return 1;
            }
        }
    }
    else if(success)
    {
        new pip[16],string[256],name[25];
        foreach(Player, i)
        {
            GetPlayerIp(i, pip, sizeof(pip));
            if(!strcmp(ip, pip, true))
           	{
			GetPlayerName(i, name, sizeof(name));
		       
                Kick(i); // kicks the player, even if it's correct pass.
                return 1;
            }
        }
	}
    return 1;
}
well thanks (I tested it and it works)
Reply


Messages In This Thread
How to prevent rcon crack ? - by Lester23 - 27.04.2017, 13:07
Re: How to prevent rcon crack ? - by Astralis - 27.04.2017, 14:32
Re: How to prevent rcon crack ? - by Chaprnks - 27.04.2017, 15:48
Re: How to prevent rcon crack ? - by Lester23 - 27.04.2017, 17:26
Re: How to prevent rcon crack ? - by Chaprnks - 27.04.2017, 20:04
Re: How to prevent rcon crack ? - by 001 - 27.04.2017, 22:12

Forum Jump:


Users browsing this thread: 1 Guest(s)