This is a basic CTF Scoreboard, with support for teams or indi
competitors, and a handful of other features.
Copyright 2020 Google LLC.
This is not an official Google product.
Author: Please see the AUTHORS file.
This is a 2.x branch. We' categories, in favor of tagging
challenges. This simplifies the codebase significantly, and is a better fit
since so many challenges border on more than one category. However, this branch
is not compatible with databases from 1.x. If you need that, check out the 1.x
branch, which will only be getting security & bug fixes.
1. Install Python with PIP and setuptools. If you'd like to use a ,
set one up and activate it now. Please note that only Python 3.6+ is
officially supported at the present time, but it should still work on Python 2.7.
2. Install the dependencies:
pip install -r requirements.txt
3. Install a database library. For MySQL, consider PyMySQL. For Postgres,
use psycopg2. (Others may work; untested.)
4. Write a config.py for your relevant installation. An example is provided in
config.example.py.
SQLALCHEMY_DATABASE_URI = 'mysql://username:password/db'
#SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://username:password/db'
SECRET_KEY = 'Some Random Value For Session Keys'
TEAM_SECRET_KEY = 'Another Random Value For Team Invite Codes'
TITLE = 'FakeCTF'
TEAMS = True
ATTACHMENT_DIR = 'attachments'
LOGIN_METHOD = 'local' # or appengine
If you are using plaintext HTTP to run your scoreboard, you will need to add the
following to your config.py, so that cookies will work:
SESSION_COOKIE_SECURE = False
If you are de the scoreboard, the following settings may be useful for
debugging purposes. Not useful for production usage, however.
COUNT_QUERIES = True
SQLALCHEMY_ECHO = True
5. Create the database:
python main.py createdb
6. Set up your fa 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 ha. Sample configs are in doc/.
7. Register a user. The first user registed is automatically made an admin.
You probably want to register your user before your players get access.
8. Have fun! Maybe set up some challenges. Players might like that more.
1. Na to the folder where the Dockerfile is located.
2. Run the command below to build a docker image for the scoreboard and tag it as "scoreboard".
docker build -t "scoreboard" .
3. Run the command below to create the docker container.
docker create -p 80:80 scoreboard
4. Find the name of the container you created for the scoreboard.
docker container ls -a
5. Run the command below to start the docker container for the scoreboard.
docker start "container_name"
SCORING: Set to 'progressive' to enable a scoring system where the total
points for each challenge are divided amongst all the teams that solve that
challenge. This rewards teams that sol solved (hard or obscure)
challenges.
TITLE: Scoreboard page titles.
TEAMS: True if teams should be used, False for each player on their own
team.
SQLALCHEMY_DATABASE_URI: A SQLAlchemy database URI string.
LOGIN_METHOD: Supports 'local'
![Build Status]()
![codecov]()
Use hooks
ln -s ../../.hooks/pre-commit.sh .git/hooks/pre-commit
Test Cases
This project stands on the shoulders of giants.
A big thanks to the following projects used to build this:
And many more indirect dependencies.
开发语言:Python
Star 数:174
该项目属于CTF思路方向的开源资源,代码结构清晰,适合安全研究人员学习参考。项目围绕Scoreboard for Capture The Flag competitions.展开,提供了可运行的实现,对理解相关安全机制、工具原理与攻防技术具有较高的研究价值。
从技术实现角度看,此类项目的核心在于对底层原理的深入理解与工程化落地。开发者在研究过程中可以结合官方文档与社区讨论,梳理项目的初始化流程、核心模块职责与数据流转,逐步掌握其中的技术细节与设计思路。
1. 下载源码压缩包,解压到本地环境。
2. 根据项目类型准备对应的运行环境与依赖。
3. 按照 README 中的步骤完成配置与部署。
4. 在隔离的测试环境中运行验证,避免影响生产系统。
本资源来源于开源社区,仅供安全研究、技术学习与合法授权范围内的攻防演练使用,请勿用于任何非法或侵害他人权益的用途。使用本项目产生的一切后果由使用者自行承担。
| 资源标题 | ctfscoreboard - 夺旗 |
| 所属分类 | CTF思路 |
| 发布作者 | admin |
| 发布时间 | 2026-10-05 23:48:05 |
| 下载权限 | 免费下载 |
| 附件数量 | 2 个下载链接 |
| 浏览次数 | 102 |
| 讨论数量 | 0 |
| 主题状态 | 正常讨论中 |