update README and LICENSE
parent
c455aa4774
commit
fc1bf894f4
11
LICENSE
11
LICENSE
|
@ -1,3 +1,14 @@
|
|||
Copyright (c) 2016 IceCTF
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
The original Flagbase license follows:
|
||||
|
||||
Copyright 2015-2016, Fox Wilson
|
||||
|
||||
Usage of the works is permitted provided that this instrument is retained with the works, so that any entity that uses the works is notified of this instrument.
|
||||
|
|
66
README.md
66
README.md
|
@ -1,11 +1,8 @@
|
|||
# Flagbase
|
||||
This is the platform for TJCTF. It's (what I think is) the best of the MITRE,
|
||||
CTFd, and picoCTF platforms rolled up into a Flask application.
|
||||
|
||||
I'm bad at naming things.
|
||||
# ColdPlatform
|
||||
This is the platform for IceCTF. It is based off of the platform for TJCTF, (https://github.com/TJCSec/ctf-platform)[https://github.com/TJCSec/ctf-platform]
|
||||
|
||||
## Installation
|
||||
You're going to want to edit `config.py`. The variable names should be fairly
|
||||
Edit `config.py` to your liking. The variable names should be fairly
|
||||
self-explanatory.
|
||||
|
||||
You're going to want to create a file called `secrets`. It will look like this:
|
||||
|
@ -16,15 +13,26 @@ mailgun_key: key-asdflkjasdhflkjsdahflkhsdaklfjhasd
|
|||
recaptcha_key: asdlkfjhasdlkjfhlsdakjfh
|
||||
recaptcha_secret: sdakjfhsdalkfjhsdalkfjh
|
||||
key: this can be anything you want, it is your flask secret_key
|
||||
shell_host: shell
|
||||
shell_username: shellaccounts
|
||||
shell_privkey: path to private key used to log in
|
||||
```
|
||||
|
||||
You should edit line 2 of database.py, unless you want to use SQLite. This uses
|
||||
Peewee, so you can use any Peewee-supported database.
|
||||
For production, create a file called `database` as well, with the settings
|
||||
```
|
||||
host: localhost
|
||||
database: ctf
|
||||
user: user
|
||||
password: password
|
||||
```
|
||||
|
||||
To run the server with production settings, set the environment variable `PRODUCTION=1` before running the server.
|
||||
|
||||
You can create some problem YAML files that look like this:
|
||||
|
||||
```yml
|
||||
name: Problem Name
|
||||
alias: problem alias
|
||||
author: ME!
|
||||
category: Binary
|
||||
description: binary binary binary binary. i love binary
|
||||
|
@ -32,53 +40,21 @@ points: 250
|
|||
flags: "flag{whatever}"
|
||||
```
|
||||
|
||||
Then add them with `./ctftool add-challenge problem.yml` and it'll get put in the
|
||||
Then add them with `./ctftool challenges add problem.yml` and it'll get put in the
|
||||
database.
|
||||
|
||||
Run `python app.py` and you have a server running. You probably want to deploy
|
||||
Run `python3 app.py` and you have a server running. You probably want to deploy
|
||||
it with `gunicorn` or similar, long-term.
|
||||
|
||||
## ctftool
|
||||
|
||||
You can do some really fancy stuff with `ctftool`. If you have a directory structure
|
||||
like this:
|
||||
|
||||
- ctf-platform
|
||||
- ctf-problems
|
||||
- problem1
|
||||
- problem.yml
|
||||
- static.yml
|
||||
- problem2
|
||||
- problem.yml
|
||||
- static.yml
|
||||
- problem3
|
||||
- problem.yml
|
||||
- problem4
|
||||
|
||||
You can run `./ctftool scan ../ctf-problems/` and get a fully populated database
|
||||
You can run `./ctftool challenges scan ../ctf-problems/` and get a fully populated database
|
||||
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.
|
||||
|
||||
## Contributing
|
||||
|
||||
Flagbase is under really heavy development right now. That means
|
||||
There are some missing features in the platform, and if you would like to contribute, feel free to send pull requests!
|
||||
|
||||
- **Absolutely do** submit issues: bugs and feature requests are awesome.
|
||||
|
||||
- **Don't** submit a pull request for:
|
||||
- a major feature addition
|
||||
- database model changes
|
||||
|
||||
- **Do** submit pull requests for:
|
||||
- documentation addition/edits
|
||||
- minor bugfixes
|
||||
- small changes to existing features
|
||||
|
||||
If you're touching `database.py` or `config.py`, you're probably doing it wrong.
|
||||
|
||||
If you decide to ignore my guidelines, **write detailed documentation** on what your
|
||||
pull request consists of, what problems it fixes, how it works, and what issues
|
||||
it could bring up.
|
||||
|
||||
Of course, you are more than welcome to fork the repository.
|
||||
If you find any issues or would like to send a feature request feel free to create an issue.
|
||||
|
|
Loading…
Reference in New Issue