[SOLVED] Connection log.
#1

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.
Reply
#2

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.
Reply
#3

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?
Reply
#4

No, you'll have to capture and scan the incoming packets.
Reply
#5

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.
Reply
#6

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:

pawn Code:
ConnectLog(playerid);
Reply
#7

Unknown, you just made log where I will see just players witch connects...
But I need logger witch logs Doser IP...
Reply
#8

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.
Reply
#9

****** "packet capturing" and ignore what these people are saying, they probably don't have any experience with blocking DoS attacks.
Reply
#10

Quote:

Customer: which kind of attack? DDoS?
Operator: Correct
Customer: Ban all the IPs then
Customer: use .htaccess

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)