Join flood o que pode ser? -
MineiroH - 11.07.2013
eai manos, tem um tipo de ataque que esta me irritando jб hoje de manha me atacaram umas 20 vezes.
Ele funciona +- assim: (tirei isso do server.log)
[09:28:33] [join] [HAX]266394562535661 has joined the server (42:189.164.40.81)
[09:28:33] [join] [HAX]462682551015176 has joined the server (42:189.164.40.81)
[09:28:33] [join] [HAX]024336282343436 has joined the server (42:189.164.40.81)
[09:28:33] [join] [HAX]473980088051436 has joined the server (42:189.164.40.81)
[09:28:33] [join] [HAX]921982340231989 has joined the server (42:189.164.40.81)
[09:28:33] [join] [HAX]913514253892870 has joined the server (42:189.164.40.81)
[09:28:33] [join] [HAX]481935979801475 has joined the server (42:189.164.40.81)
[09:28:33] [join] [HAX]509282450440511 has joined the server (42:189.164.40.81)
[09:28:33] [join] [HAX]908387269381033 has joined the server (42:189.164.40.81)
[09:28:33] [join] [HAX]480154137358569 has joined the server (42:189.164.40.81)
[09:28:33] [join] [HAX]893606978941566 has joined the server (42:189.164.40.81)
[09:28:33] [join] [HAX]667140612149523 has joined the server (42:189.164.40.81)
[09:28:33] [join] [HAX]152316882771260 has joined the server (42:189.164.40.81)
[09:28:33] [join] [HAX]946036245881214 has joined the server (42:189.164.40.81)
[09:28:33] [join] [HAX]824529983869866 has joined the server (42:189.164.40.81)
Tem muito mais do que isso, deve ter umas 30 paginas so com esse flood ae.
Obs: Eu ja uso a proteзгo de IP que limita as conexхes por IP mas mesmo assim acontece.
e tambйm nгo basta bloquear a tag "HAX" pois esse nome й randomico o cara pode alterar pra qualquer um.
como posso boquear esse tipo de flood?
ajuda?
Re: Join flood o que pode ser? -
StrondA_ - 11.07.2013
nгo usa como filterscript, coloque dentro do seu game-mode.
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);
Ban(playerid);
return 1;
}
return 0;
}
//--------------------------------------------
й pra resolver, as vezes pode ser algum filterscript dando problema.
caso nгo resolva o problema, vocк pode limitar o tempo que o mesmo ip se conecta no servidor, utilizando esta include.
Ъtil
Re: Join flood o que pode ser? -
MineiroH - 11.07.2013
Entгo mano eu jб atй tenho este codigo ae dentro do gm mesmo.
La no chat do serv quando o cara entra aparece assim:
[HAX]152316882771260 entrou no servidor IP: 189.164.40.81
[HAX]667140612149523 entrou no servidor IP: 189.164.40.81
[HAX]908387269381033 entrou no servidor IP: 189.164.40.81
[HAX]921982340231989 entrou no servidor IP: 189.164.40.81
[HAX]266394562535661 entrou no servidor IP: 189.164.40.81
[HAX]824529983869866 entrou no servidor IP: 189.164.40.81
(...)
esse script ae nao esta pegando nao sei por que!
Re: Join flood o que pode ser? -
maikonk - 11.07.2013
Ai aproveitando o tуpico,
mas se o player logar + de 3 vezes em um dia, por exemplo, nгo precisa ser no mesmo horбrio
ele ira banir o player?
Re: Join flood o que pode ser? -
MineiroH - 11.07.2013
Claro que nao. o cod sу pega quando a 3 conexao ao mesmo tempo. por isso q estranhei