Skip to content

Commit

Permalink
better docs
Browse files Browse the repository at this point in the history
  • Loading branch information
eshaan7 committed Jul 21, 2019
1 parent d22adb6 commit 635121f
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ A CTF framework(in flask) for HackTheBox style machines.
## Features

* Flask Blueprints
* Flask-admin for Admin views and easy realtime management
* Easily deployable on Heroku.
* User Registration, account management, Forgot password
* Hash submission (currently 2 hashes: user and root)
Expand All @@ -18,28 +19,43 @@ A CTF framework(in flask) for HackTheBox style machines.
* `Python 3.7.3` or atleast `> 3.6`.
* Packages: [`src/requirements.txt`](src/requirements.txt).

1. Git clone the repo and `cd ` into it

```bash
$ git clone https://github.com/abs0lut3pwn4g3/RTB-CTF-Framework
$ cd RTB-CTF-Framework/src/
$ cd RTB-CTF-Framework/
```
2. Create `virtual environment` to deal with dependencies and requirements.

```bash
$ virtualenv -p /usr/bin/python3 venv
$ source venv/bin/activate
$ cd src/
```

3. With `virtual environment` activated, install requirements, init db and run !

```python
[venv]$ pip install -r requirements.txt
[venv]$ python create_db.py # Only required on first run
[venv]$ python run.py
```

Using this as simple as anything. Just configure your CTF settings in [`config.py`](https://github.com/abs0lut3pwn4g3/RTB-CTF-Framework/blob/master/src/FlaskRTBCTF/config.py).

> Note: DO NOT FORGET to change admin credentials from [create_db.py]((https://github.com/abs0lut3pwn4g3/RTB-CTF-Framework/blob/master/src/create_db.py)
#### Creating database instance file

Locally or for docker,
Locally or for docker/linux server,

```bash
$ source venv/bin/activate
$ python3 # open python interpreter
>>> from FlaskRTBCTF import db, create_app
>>> db.create_all(app=create_app())
$ python src/create_db.py
```

> Running this also creates an admin account by default,
For Heroku,

```bash
Expand All @@ -50,15 +66,15 @@ $ heroku run python

## To-do

- [ ] isAdmin column in User table and Admin views (priority)
- [ ] db relationship between User and Score Tables
- [ ] Support for more hashes
- [ ] Testing Password reset functionality
- [ ] Notifications
- [ ] More info for `home.html`
- [ ] Need to implement `account.html` (not a priority)

<hr/>

- [x] isAdmin column in User table and Admin views (priority)
- [x] Use Flask Blueprinsts
- [x] Finalize black theme?
- [x] Error messages not appearing in `/submit`
Expand Down

0 comments on commit 635121f

Please sign in to comment.