CTFd环境安装

0x01下载:
https://github.com/CTFd/CTFd/archive/1.0.3.tar.gz

0x02安装
Ubuntu 14.04.3 LTS

./prepare.sh to install dependencies using apt.
Modify CTFd/config.py to your liking. 默认即可
Use python serve.py in a terminal to drop into debug mode.
hostIP改成需要的IP;host=”10.160.11.191”
Here are some deployment options
You can check out the Getting Started guide for a breakdown of some of the features you need to get started.

:4000/admin/containers 添加容器
:4000/admin/chals 添加题目
:4000/admin/config 修改界面配置,定义ctf

0x03:结构解释
├── CHANGELOG.md
├── CTFd
│ ├── admin
│ ├── auth.py
│ ├── auth.pyc
│ ├── challenges.py
│ ├── challenges.pyc
│ ├── config.py
配置脚本
│ ├── config.pyc
│ ├── ctfd.db
│ ├── init.py
https://dormousehole.readthedocs.io/en/latest/config.html#id5
1、Flask 是一个用于 Python 的微型网络开发框架。
2、Flask使用配置文件,必须使用 from_object():使用类和类的继承来配置
3、该脚本定义了create_app主函数
│ ├── init.pyc
│ ├── logs
│ ├── models.py
│ ├── models.pyc
│ ├── plugins
│ ├── scoreboard.py
│ ├── scoreboard.pyc
│ ├── themes
│ ├── uploads
│ ├── utils.py
1、该脚本定义了ctfd的大部分方法函数,例如cft_started
│ ├── utils.pyc
│ ├── views.py
│ └── views.pyc
├── ctfd.ini 参考
https://baike.baidu.com/item/uwsgi/673705?fr=aladdin
http://developer.51cto.com/art/201010/229615.htm
├── development.txt
├── docker-compose.yml
├── docker-entrypoint.sh
├── Dockerfile
├── export.py
├── import.py
├── LICENSE
├── manage.py
├── migrations
│ ├── alembic.ini
│ ├── env.py
│ ├── env.pyc
│ ├── README
│ ├── script.py.mako
│ └── versions
├── populate.py
├── prepare.sh
├── README.md
├── requirements.txt
├── serve.py
├── setup.cfg
├── tests
│ ├── helpers.py
│ ├── init.py
│ ├── test_admin_facing.py
│ ├── test_user_facing.py
│ └── test_utils.py
└── wsgi.py

0x04:生产环境
root@ubuntu:~/CTFd-1.0.3# pwd
/root/CTFd-1.0.3
root@ubuntu:~/CTFd-1.0.3# python serve.py
* Running on http://10.160.11.191:4000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 105-760-859

你可能感兴趣的:(CTFd环境安装)