ColdCore/README.md

67 lines
2.1 KiB
Markdown
Raw Normal View History

2016-09-06 20:43:21 +00:00
# ColdCore
2017-09-25 06:42:42 +00:00
2016-09-06 20:41:25 +00:00
This is the platform for IceCTF. It is based off of the platform for TJCTF, [TJCSec/ctf-platform](https://github.com/TJCSec/ctf-platform), although with hefty changes.
2015-11-29 03:11:12 +00:00
2015-11-08 06:38:51 +00:00
## Installation
2017-09-25 06:42:42 +00:00
Install dependencies with `pip3 install -r requirements.txt`.
2016-09-06 20:39:27 +00:00
Edit `config.py` to your liking. The variable names should be fairly
2015-11-08 06:38:51 +00:00
self-explanatory.
2015-11-29 03:11:12 +00:00
You're going to want to create a file called `secrets`. It will look like this:
```yml
mailgun_url: https://api.mailgun.net/v3/tjctf.org
mailgun_key: key-asdflkjasdhflkjsdahflkhsdaklfjhasd
recaptcha_key: asdlkfjhasdlkjfhlsdakjfh
recaptcha_secret: sdakjfhsdalkfjhsdalkfjh
key: this can be anything you want, it is your flask secret_key
2016-09-06 20:39:27 +00:00
shell_host: shell
shell_username: shellaccounts
shell_privkey: path to private key used to log in
```
For production, create a file called `database` as well, with the settings
```
host: localhost
database: ctf
user: user
password: password
2015-11-29 03:11:12 +00:00
```
2017-09-25 18:00:36 +00:00
Then initiate the database with `./ctftool database create-tables`.
2016-09-06 20:39:27 +00:00
To run the server with production settings, set the environment variable `PRODUCTION=1` before running the server.
2015-11-08 06:38:51 +00:00
You can create some problem YAML files that look like this:
```yml
name: Problem Name
2016-09-06 20:39:27 +00:00
alias: problem alias
2015-11-29 03:11:12 +00:00
author: ME!
2015-11-08 06:38:51 +00:00
category: Binary
description: binary binary binary binary. i love binary
points: 250
flags: "flag{whatever}"
```
2016-09-06 20:39:27 +00:00
Then add them with `./ctftool challenges add problem.yml` and it'll get put in the
2015-11-08 06:38:51 +00:00
database.
2016-09-06 20:39:27 +00:00
Run `python3 app.py` and you have a server running. You probably want to deploy
2015-11-08 06:38:51 +00:00
it with `gunicorn` or similar, long-term.
2015-12-01 04:14:16 +00:00
## ctftool
2016-09-06 20:39:27 +00:00
You can run `./ctftool challenges scan ../ctf-problems/` and get a fully populated database
2015-12-01 04:14:16 +00:00
with information from all the problem.yml files, and automatically generated
static file names, and automatic substitutions for static file links in
problem.yml. More documentation on this to come soon.
2015-12-01 04:22:31 +00:00
## Contributing
2016-09-06 20:39:27 +00:00
There are some missing features in the platform, and if you would like to contribute, feel free to send pull requests!
2015-12-01 04:22:31 +00:00
2016-09-06 20:39:27 +00:00
If you find any issues or would like to send a feature request feel free to create an issue.