Belugo Posted March 13, 2018 Share Posted March 13, 2018 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! Link to comment Share on other sites More sharing options...
StompyNZ Posted March 13, 2018 Share Posted March 13, 2018 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 Link to comment Share on other sites More sharing options...
Belugo Posted March 14, 2018 Author Share Posted March 14, 2018 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! Link to comment Share on other sites More sharing options...
TSHAKU Posted February 25, 2019 Share Posted February 25, 2019 Does this work with A17.1? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.