ctftool

command module
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2023 License: MIT Imports: 1 Imported by: 0

README

CTFTOOL

Go Reference Go Report Card GitHub Workflow Status

CTFTool is a robust and user-friendly command-line interface tool developed for interacting with ctftime.org and downloading challenges from CTFd.

CTFTOOL

Overview

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

Installation

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.

  1. Clone the repository:
git clone https://github.com/ritchies/ctftool.git
  1. Navigate into the project directory:
cd ctftool
  1. Install using make:
make install

You can also use make build, this will create an executable in the bin/ directory.

From Source: Using go install

Ensure you are on a recent version of Go and then run the following command:

go install -v github.com/ritchies/ctftool@latest

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 download --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.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
lib
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL