Skip to content

1. Platform

AleJnd Alliance edited this page May 13, 2018 · 1 revision

buildTables.sh

  • build the required database tables

clean.sh

  • SQLite3 database data cleanup

lang.json

  • predefined wording to be used as the language of the platform

server.py

  • main Flask application
  • run it with
python server.py

templates

  • where all the HTML files located

static

  • where all the JS, CSS, etc files located

config.json

  • config file used to enable/disable basic functionalities

    • "secret_key": "PLEASE_CHANGE_ME" - cryptographic key used by the flask
    • "attack_key": "PLEASE_CHANGE_ME" - cryptographic key used to attack flag submission
    • "host": "0.0.0.0" - host IP that you want to set
    • "port": 8888 - change your desired port here
    • "registration_enabled" - enable/disable the public registration
    • "public_enabled": true - if set to true, public can view scoreboard and logs
    • "attack_enabled": true - to enable Attack and Defense mode
    • "isProxied": false - tells the Flask that it is going to communicate via proxy
    • "csrf_enabled": false - prevent cross submit flag, disabled by default, not tested :P
    • "username_regex": "^[a-zA-Z0-9-_. &']+$" - allowed username characters
    • "attack_score" - amount of score to be deducted and add for attack and defense mode
    • "startTime": "5-9-18 12:00PM" - start time in MM-DD-YY HH:MM 12 hours time
    • "stopTime": "5-12-18 12:47AM" - stop time in MM-DD-YY HH:MM 12 hours time
    • "stopScoreboard": "5-13-18 4:13PM" - stop scoreboard view, time in MM-DD-YY HH:MM 12 hours time
    • "db": "sqlite:///ctf.db?check_same_thread=False"
      • By default, check_same_thread is True and only the creating thread may use the connection. If set False, the returned connection may be shared across multiple threads. When using multiple threads with the same connection writing operations should be serialized by the user to avoid data corruption.
    • "language_file": "lang.json" - language file that server.py will read
    • "language": "english"
      • predefined wording to be used as the language of the platform, if have other language are set in the lang.json, just change it here.
    • "log_file": "gameplay.log" - log file to display on logs tabs on web app
    • "debug": true - debug view

utils/get_final_results.py

  • used to get the final results after the scoreboard is disabled

utils/import_pwn_flags.py

  • used to import pwn flags
Clone this wiki locally