https://github.com/trickeydan/ctff
CTF Framework
https://github.com/trickeydan/ctff
capture ctf cyber flag framework python security the
Last synced: 3 months ago
JSON representation
CTF Framework
- Host: GitHub
- URL: https://github.com/trickeydan/ctff
- Owner: trickeydan
- License: mit
- Created: 2020-02-14T16:00:49.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2024-03-01T19:15:36.000Z (about 2 years ago)
- Last Synced: 2024-03-01T20:29:44.951Z (about 2 years ago)
- Topics: capture, ctf, cyber, flag, framework, python, security, the
- Language: Python
- Size: 91.8 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CTFF - CTF Framework
A Framework for building CTFs.
CTFF can be used to define Capture The Flag (CTF) challenges in a very minimal
amount of code, and render an interface for competitors to view and attempt
challenges. Building a mini web-interface seems to be a thing that we frequently
do when building a CTF and this framework aims to reduce that effort to near-zero.
CTFF is built on top of [Flask](https://flask.palletsprojects.com/) and supplements it's functionality.
All of the usual Flask features and functionality are still available.
## CTF Structure
The framework currently assumes that CTFs consist of a series of challenges, which are grouped
together. The groups might be levels, or categories of challenges, the framework leaves it up to the author.
Each challenge consists of a number of "parts", one of which will usually be a submission. A challenge can only have one submission pathway, but multiple solutions or inputs if desired.
```python
@challenge_group.challenge
class MyChallenge(Challenge):
title = "My Challenge"
flag = "flag{ZzZzZzZ}"
def __init__(self) -> None:
self.parts = [
MarkdownPart("What lives in a hive and goes zzzz?"),
TextSubmissionPart("example"),
]
def verify_submission(self) -> bool:
return request.form["example"] == "bees"
```
## Contributions
This project is released under the MIT Licence. For more information, please see LICENSE.