[SOLVED] Connection log. -
kukars22 - 29.12.2009
Hello everyone.
I know than heres many topics about DDos/Dos
But I just want to know if theres any Program witch logs every connection to server so I can see from witch IP doser is comming.
Thanks.
Re: [HELP] Connection log. -
Crezy-Boy - 29.12.2009
Search for a topic.
You can see it from server_log.txt file, where is a line: Incoming connection from: IP:PORT, or was it in console? Dont remember, but in console you can see it.
Re: [HELP] Connection log. -
kukars22 - 29.12.2009
Quote:
Originally Posted by ImNotGettingPawno
Search for a topic.
You can see it from server_log.txt file, where is a line: Incoming connection from: IP:PORT, or was it in console? Dont remember, but in console you can see it.
|
So your saying than I will see like spam with that guy whos dosing?
Re: [HELP] Connection log. -
RoBo - 29.12.2009
No, you'll have to capture and scan the incoming packets.
Re: [HELP] Connection log. -
kukars22 - 29.12.2009
Quote:
Originally Posted by RoBo
No, you'll have to capture and scan the incoming packets.
|
So how can I see those incomming connections?
I want to see that IP witch is spamming, but I just check server log
and I dont see any connections.
Re: [HELP] Connection log. -
[NYRP]Mike. - 29.12.2009
Add this anywhere in your script:
pawn Code:
forward ConnectLog(playerid);
public ConnectLog(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
new hour;
new minute;
new second;
new day;
new month;
new year;
getdate(year, month, day);
gettime(hour,minute,second);
new cmd[264];
new File:Connections;
Connections = fopen("logs/connections.log",io_append);
format(cmd,sizeof(cmd),"[%02d/%02d/%02d %02d:%02d:%02d] Player: %s || ID: %d || IP: %s connected. \r\n",day, month, year, hour, minute, second,name,playerid,PlayerIP(playerid));
fwrite(Connections,cmd);
fclose(Connections);
print(cmd);
return 1;
}
and this above it
pawn Code:
stock PlayerIP(playerid)
{
new IP[264];
GetPlayerIp(playerid, IP, 264);
return IP;
}
then add this under onplayerconnect:
Re: [HELP] Connection log. -
kukars22 - 29.12.2009
Unknown, you just made log where I will see just players witch connects...
But I need logger witch logs Doser IP...
Re: [HELP] Connection log. -
[NYRP]Mike. - 29.12.2009
Yeah.. once the Doser connects it will output his ip, just make sure you check the log after he connects, e.g Doser connects and server begins to lagg / crash check the log the last one should be him.
Re: [HELP] Connection log. -
RoBo - 29.12.2009
****** "packet capturing" and ignore what these people are saying, they probably don't have any experience with blocking DoS attacks.
Re: [HELP] Connection log. -
Westie - 29.12.2009
Quote:
Customer: which kind of attack? DDoS?
Operator: Correct
Customer: Ban all the IPs then
Customer: use .htaccess
|