CTFTool is a robust and user-friendly command-line interface tool developed for interacting with ctftime.org and downloading challenges from CTFd.
Installation
Ensure you are on a recent version of Go and then run the following command:
go install github.com/ritchies/ctftool@latest
Downloading the latest release
Visit the releases page page and download the appropriate version for your operating system.
Overview
With CTFTool, you can:
- Interact with ctftime and CTFd
- List upcoming CTFs
- List the top 10 teams on ctftime and CTFd
- Download challenges from CTFd
- Create a writeup template for each challenge
Commands
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
Usage Examples
Show the upcoming CTF's listed on ctftime:
$ ctftool ctftime
Download challenges from a specific CTFd instance:
$ ctftool ctfd --username=<user> --password=<pass> --url=<url> --output=<output>
Current Limitations
- Unable to correctly handle Cloudflare bot protection
- Unable to effectively manage captchas
- Unsupported CTF instances, such as rCTF
Completion
# 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
Contributions
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.
License
CTFTool is released under the MIT license. For more information, visit the LICENSE page.