CTFTool is a robust and user-friendly command-line interface tool developed for interacting with ctftime.org and downloading challenges from CTFd.
CTFTool streamlines your Capture The Flag (CTF) experience by offering a powerful, yet easy-to-use, command-line interface. Designed to work with platforms like ctftime.org and CTFd, this tool enables you to:
- Fetch details of upcoming CTF competitions from ctftime.org
- Rank the top 10 teams from both ctftime.org and CTFd platforms
- Directly download challenges from CTFd into your local environment
- Automatically generate writeup templates for each challenge
There are several ways to install, it is recommended to download the latest release or build it from source using make install
or make build
.
Visit the releases page page and download the appropriate version for your operating system.
Ensure you are on a recent version of Go, and have git and make installed.
- Clone the repository:
git clone https://github.com/ritchies/ctftool.git
- Navigate into the project directory:
cd ctftool
- Install using make:
make install
You can also use make build
, this will create an executable in the bin/
directory.
Ensure you are on a recent version of Go and then run the following command:
go install -v github.com/ritchies/ctftool@latest
Available Commands:
completion Generate shell completion script
ctfd Query CTFd instance
ctftime Query CTFTime
help Help about any command
version Print the version number
Flags:
--config string Config file (default is .ctftool.yaml)
-h, --help help for ctftool
--log-format string Logger output format (text|json) (default "text")
-v, --verbose Verbose logging
-V, --version Print version information
Show the upcoming CTF's listed on ctftime:
ctftool ctftime
Download challenges from a specific CTFd instance:
ctftool ctfd download --username=<user> --password=<pass> --url=<url> --output=<output>
- Unable to correctly handle Cloudflare bot protection
- Unable to effectively manage captchas
- Unsupported CTF instances, such as rCTF
# Bash
$ source <(ctftool completion bash)
# Zsh
$ ctftool completion zsh > "${fpath[1]}/_ctftool"
# Fish
$ ctftool completion fish > ~/.config/fish/completions/ctftool.fish
# PowerShell
PS> ctftool completion powershell > ctftool.ps1
CTFTool is a personal project that embraces the spirit of open-source collaboration. Your contributions can play an essential role in its enhancement and evolution. To understand how you can contribute, please refer to our Guide for Contributors.
CTFTool is released under the MIT license. For more information, visit the LICENSE page.