This is a basic CTF Scoreboard, with support for hints, teams or individual competitors, and a handful of other features.
Author: David Tomaschik david@systemoverlord.com
-
Install Python with PIP and setuptools. If you'd like to use a virtualenv, set one up and activate it now.
-
Install the dependencies: pip install -r requirements.txt
-
Install a database library. For MySQL, consider mysql-python. For Postgres, use psycopg2. (Others may work; untested.)
-
Write a config.py for your relevant installation.
SQLALCHEMY_DATABASE_URI = 'mysql://username:password@server/db' #SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://username:password@server/db' SECRET_KEY = 'Some Random Value For Session Keys' TITLE = 'FakeCTF' TEAMS = True ATTACHMENT_DIR = 'attachments'
-
Create the database:
python main.py createdb
-
Set up your favorite python application server, optionally behind a webserver. You'll want to use main.app as your WSGI handler. Tested with uwsgi + nginx. Not tested with anything else, let me know if you have success. Sample configs are in doc/.
-
Register a user. The first user registed is automatically made an admin. You probably want to register your user before your players get access.
-
Have fun! Maybe set up some challenges. Players might like that more.
Test Cases
- Setup database
- Create user, verify admin
- Create category
- Create challenge
- With, without hint
- With, without attachment
- Edit challenges
- Add attachment
- Delete attachment
- Add hint
- Delete hint
- Download backup
- Restore backup
- Create 2nd user, verify not admin
- Solve challenge
- Download attachment
- Get hint
- Solve challenge w/hint
This project stands on the shoulders of giants. A big thanks to the following projects used to build this:
And many more indirect dependencies.