SAFE? Logging All Connections - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SAFE? Logging All Connections (
/showthread.php?tid=147667)
SAFE? Logging All Connections -
cAMo - 13.05.2010
Just wondering your views on this topic...
My script is setup to insert an entry into my MYSQL database for every connection (logging connection activity).
OnPlayerConnect - Logs account name, ip, time, type
OnPlayerDisconnect - Logs account name, ip, time, type
Are there any security risks by doing this (ie: server could crash -- assuming if it was to be attacked)?
Should I, instead, log connections after successful logins and only the disconnects from logged in accounts?
Thanks!
Re: SAFE? Logging All Connections -
juice.j - 13.05.2010
As long as you don't have to worry much about traffic or overwhelmed CPU's there shouldn't be a problem. MySQL is quite ressource friendly.
However are there really any attacks resulting in many users connecting at the same time and if so, couldn't you just additionally create a little system blocking those?
Re: SAFE? Logging All Connections -
cAMo - 13.05.2010
Not sure. I have witnessed, although rare and not recently (current version), loading attacks. Where someone sends in a massive amount of clients that load the server completely full.