• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

[A16-SERVER] Simply MySQL statistics mod

Belugo

New member
Hey.

This is a simple modification that allows you to write server statistics to the MySQL (or MariaDB) database. Mod has been tested for several months on one of the servers in Poland.

Below is a brief description:

The Mod connects to the MySql database (or MariaDB) and sends statistics from the game in given periods of time.

#---------------------------


# INSTALLATION


1. Unpack the archive and copy all directories to the main server folder.
2. Go to the directory ~/Mods/7d2sql/ and edit the file "7d2sql-config.xml".
3. Run Server.
#---------------------------


# 7d2sql-config.xml


host - name or MySQL Server IP (for example: "localhost", "192.168.1.10" or "7dtdmyserver.com")

port - the port on which the SQL server is running. 3306 by default

login - database login

password - SQL password

schema - database name (NOTE: it must be created earlier, mod can not create it himself!)

table - table in which statistics are saved

delay - game *tick's delay. The higher, the longer the intervals between the saves. Values ​​less than 200 can cause lags.

#---------------------------


# Entry in the database:


ID, gametime, time, playerid, nick, pos1, pos2, pos3, resp1, resp2, resp3, remote, health, deaths, zombies, players, score, level, steamid, ip, ping, date

#---------------------------


# DOWNLOAD


>>Download <<

>>or here <<

Ps. Mod is part of a larger anti-hack system ;) and is used to display statistics on the website.

Cya!

 
Last edited by a moderator:
Hey Belugo, a quick note: I had a peek at the code and it didn't appear to sanitise the players name, so it may be possible to do SQL injection with a special name.

Otherwise nice work :)

 
Hey Belugo, a quick note: I had a peek at the code and it didn't appear to sanitise the players name, so it may be possible to do SQL injection with a special name.
Otherwise nice work :)
Hey Stompy!

there is a line of code, that deletes some of the characters from the player's name.

Probably quotes and similar chars, but I do not remember exactly.

Cheers!

 
Back
Top