[Tutorial] Detect Who Attempted Login Your Rcon 2 Times
#1

Detect Who Attempted Login Your Rcon 2 Times
Hey, This is a little tutorial to show you how to detect if someone attempted to login with your rcon with deception him, give him a wrong password, if he write it he will get banned.

Part: #1

So we start put this under public OnRconLoginAttempt(ip[], password[], success) add this: if the player write a random wrong password, he will recive this MSG: you forget the password? the password is: (for example: change)

pawn Код:
for(new i=0; i<MAX_PLAYERS; i++)
    {
     if(!success)
      {
         printf("FAILED RCON LOGIN BY IP %s USING PASSWORD %s",ip, password);
         GameTextForPlayer(i,"~y~Welcome administrator ~n~~g~REMINDER: ~y~Our rcon password is change", 4000,5);
         SendClientMessage(i, 0xFFFFFFFF, "you forget the password?  the password is: change");
      }
Part: #2
Sure he will try with the password required (change)
So if he write it he will get banned


pawn Код:
if(!strcmp(password, "change", true)) //if he tried with the password "change"
      {
           GameTextForPlayer(i,"~r~noob! ~n~~w~you attempt rcon password ~n~~r~bye", 4000,5);
           SendClientMessage(i, 0xFFFFFFFF, "Idiot!");
           Ban(i); //or Kick(i)
      }
All Script
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
     for(new i=0; i<MAX_PLAYERS; i++)
    {
     if(!success)
      {
         printf("FAILED RCON LOGIN BY IP %s USING PASSWORD %s",ip, password);
         GameTextForPlayer(i,"~y~Welcome administrator ~n~~g~REMINDER: ~y~Our rcon password is change", 4000,5);
         SendClientMessage(i, 0xFFFFFFFF, "you forget the password?  the password is: change");
      }
      if(!strcmp(password, "change", true))
      {
           GameTextForPlayer(i,"~r~noob! ~n~~w~you attempt rcon password ~n~~r~bye", 4000,5);
           SendClientMessage(i, 0xFFFFFFFF, "noob!");
           Ban(i);
      }
    }
     return 1;
}
Reply


Messages In This Thread
Detect Who Attempted Login Your Rcon 2 Times - by AmirRFCNR - 04.11.2014, 10:40
Re: Detect Who Attempted Login Your Rcon 2 Times - by Glossy42O - 04.11.2014, 11:09
Re: Detect Who Attempted Login Your Rcon 2 Times - by Jakwob - 05.11.2014, 23:50
Re: Detect Who Attempted Login Your Rcon 2 Times - by Eth - 06.11.2014, 00:32
Re: Detect Who Attempted Login Your Rcon 2 Times - by Mauzen - 06.11.2014, 00:42

Forum Jump:


Users browsing this thread: 1 Guest(s)