Bot Attack
#1

Hello. My server is getting attacked by bots with name 100101010 just with 1 and with 0 inside.
Do you know how can i stop this ?
I was think to make something to check if players have in name just 0 and 1 ban! But can you tell me how can i do this script or.. to ban this bots
Reply
#2

There are many filterscripts, https://sampforum.blast.hk/showthread.php?tid=280974
Reply
#3

^^ Too poorly written, make your own protection since it's very easy.
Reply
#4

Give me any idea PLS how can i make it!
Please i need a basic script to protect my server
Reply
#5

If you mean they're connecting actual NPCs, you should simply add a validation check to ensure they're connecting locally. This can be done under OnPlayerConnect, for example:
pawn Код:
public OnPlayerConnect(playerid)
{
       if(IsPlayerNPC(playerid))
       {
            new local_playerIP[32];
            GetPlayerIp(playerid, local_playerIP, 32);

            if(strcmp(local_playerIP, "127.0.0.1", true) != 0)
                return Ban(playerid);
       }

       return true;
}
Reply
#6

No No! I am not connecting NPC's on server but i want to ban players who come with the same ip and with name 0 and q (EXAMPLE 10101010101011101010)
Reply
#7

I'm pretty sure they're connecting as an NPC, you should at least try using what I've given. I'm 99% positive it'll fix this.
Reply
#8

So this wont ban any player from others ?
Reply
#9

Quote:
Originally Posted by Abagail
Посмотреть сообщение
If you mean they're connecting actual NPCs, you should simply add a validation check to ensure they're connecting locally. This can be done under OnPlayerConnect, for example:
pawn Код:
public OnPlayerConnect(playerid)
{
       new local_playerIP[32];
       GetPlayerIp(playerid, local_playerIP, 32);

       if(strcmp(local_playerIP, "127.0.0.1", true) != 0)
             return Ban(playerid);
 
       return true;
}
I wouldn't put that code on my server. It'll literally ban every player.

Ontopic: limit how many players can connect from an IP (in X seconds)
Reply
#10

Quote:
Originally Posted by Spmn
Посмотреть сообщение
I wouldn't put that code on my server. It'll literally ban every player.

Ontopic: limit how many players can connect from an IP (in X seconds)
That's an accident from me, forgot to include an IsPlayerNPC check. Updated my original post. I'm 99% positive that the issue is bots connecting with ridiculous names than them connecting as a valid player, although I may be mistaken. This is what several released modifications do that you can find on several sites.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)