ctfcli is a tool to manage Capture The Flag events and challenges.
ctfcli provides challenge specifications and templates to make it easier to generate challenges of different categories. It also provides an integration with the CTFd REST API to allow for command line uploading of challenges and integration with CI/CD build systems.
ctfcli features tab completion, a REPL interface (thanks to Python-Fire) and plugin support for custom commands.
WIP: While ctfcli is heavily used by the CTFd developers, ctfcli is still considered an alpha project and changes will happen. Be sure to pin versions and read the CHANGELOG when updating.
Installation and Usage
ctfcli can be installed with
pip install ctfcli
Create an Event
ctfcli turns the current folder into a CTF event git repo. It asks for the base url of the CTFd instance you're working with and an access token.
❯ ctf init
Please enter CTFd instance URL: https://demo.ctfd.io
Please enter CTFd Admin Access Token: d41d8cd98f00b204e9800998ecf8427e
Do you want to continue with https://demo.ctfd.io and d41d8cd98f00b204e9800998ecf8427e [y/N]: y
Initialized empty Git repository in /Users/user/event/.git/
This will create the
.ctf folder with the
config file that will specify the URL, access token, and keep a record of all challenges dedicated for this event.