Results 1 to 3 of 3

Thread: [SERVER] Simply MySQL statistics mod

  1. #1
    Refugee
    Join Date
    Jul 2016
    Location
    Breslau
    Posts
    4
    Rep Power
    0

    [SERVER] Simply MySQL statistics mod

    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 Belugo; 05-22-2018 at 07:27 AM.

  2. #2
    Colony Founder StompyNZ's Avatar
    Join Date
    Apr 2015
    Posts
    3,835
    Rep Power
    1
    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

  3. #3
    Refugee
    Join Date
    Jul 2016
    Location
    Breslau
    Posts
    4
    Rep Power
    0
    Quote Originally Posted by StompyNZ View Post
    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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •