[Ajuda] Servidor sendo atacado!! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Servidor sendo atacado!! (
/showthread.php?tid=448732)
Servidor sendo atacado!! -
ThiagoMK - 05.07.2013
Galera ontem meu servidor foi atacado por bots e eu nгo consigo banir a conta original..
Os bot comeзam a flodar no chat divulgando um serviзo de hackers anonymous..
E o ping do server comeзa a subir muito mais nгo chega a cair, a primeira vez eu consegui banir a conta do dono dos bot ai todos os bots cairam mais agora eu nгo consigo mais tem muitos bots e eu nгo sei qual й o dono..
Alguem sabe como eu posso evitar isso?
Ele nгo chega a zuar o server mais ele floda no chat divulgando o serviзo dele e sobe o ping do server..
Re: Servidor sendo atacado!! -
Don_Speed - 05.07.2013
FilterScript MaxIps
Re : Re: Servidor sendo atacado!! -
ThiagoMK - 05.07.2013
Quote:
Originally Posted by Don_Speed
FilterScript MaxIps
|
O fs seria esse?:
pawn Код:
// maxips FS limits the number of players connecting from a
// single IP address.
#include <a_samp>
#define MAX_CONNECTIONS_FROM_IP 3
//---------------------------------------------
public OnFilterScriptInit()
{
printf("\n*** Player IP limiting FS (maxips) Loaded. Max connections from 1 IP = %d\n",MAX_CONNECTIONS_FROM_IP);
}
//---------------------------------------------
// GetNumberOfPlayersOnThisIP
// Returns the number of players connecting from the
// provided IP address
stock GetNumberOfPlayersOnThisIP(test_ip[])
{
new against_ip[32+1];
new x = 0;
new ip_count = 0;
for(x=0; x<MAX_PLAYERS; x++) {
if(IsPlayerConnected(x)) {
GetPlayerIp(x,against_ip,32);
if(!strcmp(against_ip,test_ip)) ip_count++;
}
}
return ip_count;
}
//---------------------------------------------
public OnPlayerConnect(playerid)
{
new connecting_ip[32+1];
GetPlayerIp(playerid,connecting_ip,32);
new num_players_on_ip = GetNumberOfPlayersOnThisIP(connecting_ip);
if(num_players_on_ip > MAX_CONNECTIONS_FROM_IP) {
printf("MAXIPs: Connecting player(%d) exceeded %d IP connections from %s.", playerid, MAX_CONNECTIONS_FROM_IP, connecting_ip);
Kick(playerid);
return 1;
}
return 0;
}
//--------------------------------------------
Re: Re : Re: Servidor sendo atacado!! -
Caio_Freeze - 05.07.2013
Quote:
Originally Posted by ThiagoMK
O fs seria esse?:
pawn Код:
// maxips FS limits the number of players connecting from a // single IP address.
#include <a_samp>
#define MAX_CONNECTIONS_FROM_IP 3
//---------------------------------------------
public OnFilterScriptInit() { printf("\n*** Player IP limiting FS (maxips) Loaded. Max connections from 1 IP = %d\n",MAX_CONNECTIONS_FROM_IP); }
//--------------------------------------------- // GetNumberOfPlayersOnThisIP // Returns the number of players connecting from the // provided IP address
stock GetNumberOfPlayersOnThisIP(test_ip[]) { new against_ip[32+1]; new x = 0; new ip_count = 0; for(x=0; x<MAX_PLAYERS; x++) { if(IsPlayerConnected(x)) { GetPlayerIp(x,against_ip,32); if(!strcmp(against_ip,test_ip)) ip_count++; } } return ip_count; }
//---------------------------------------------
public OnPlayerConnect(playerid) { new connecting_ip[32+1]; GetPlayerIp(playerid,connecting_ip,32); new num_players_on_ip = GetNumberOfPlayersOnThisIP(connecting_ip); if(num_players_on_ip > MAX_CONNECTIONS_FROM_IP) { printf("MAXIPs: Connecting player(%d) exceeded %d IP connections from %s.", playerid, MAX_CONNECTIONS_FROM_IP, connecting_ip); Kick(playerid); return 1; }
return 0; } //--------------------------------------------
|
sim й esse mesmo