Skip to main content

The ultimate CTF tool. Designed to combat the staggering lack of cross-platform CTF tools. Named after the ultimate hunter, the dragonfly.

Project description

flagonfly

The ultimate CTF tool. Designed to combat the staggering lack of cross-platform CTF tools. Named after the ultimate hunter, the dragonfly.

Installation

From PyPI

flagonfly is published to PyPI.

To install it, use a package manager like uv or pip.

It's preferable to use a package manager that will install the project in its own isolated environment, such as uv tool install or pipx install:

uv tool install flagonfly

OR

pipx install flagonfly

OR (if you don't mind installing dependencies into your global python environment)

pip install flagonfly

Local Copy

flagonfly can also be installed by cloning the repo and install it locally using pip or uv.

  1. First, clone the repository somewhere convenient. Change directory into the project:
git clone https://codeberg.org/aidnem/flagonfly.git
cd flagonfly
  1. Install the package using your package manager of choice.

It's preferable to use a package manager that will install the project in its own isolated environment, such as uv tool install or pipx install.

Install the project in editable mode (use the -e flag) so that it can be updated by running git pull at a later time:

uv tool install -e .

Alternatively, use pipx:

pipx install -e .

Finally, if you prefer pip, you can use that instead. Keep in mind that this will install the dependencies to your global pip environment:

pip install -e .

Installing using any of these 3 methods will add 3 executables to your python script path:

  • flagonfly - The flagonfly CLI. This is how all CLI tools can be used.
  • flf - A convenient alias for flagonfly. Because the command is intended to be deeply composed (e.g. cat data | flf encode binary | rev | flf decode binary), a shorter alias is useful in saving time composing commands.
  • flagonfly-gui - Launches the flagonfly GUI, a tkinter app that is intended to provide some of the functionality of the flagonfly library in a graphical form.

Core Library

The flagonfly project is separated into core, UI, and CLI projects so that the central functionality of the project can be used from other projects. Please note that, during early development, doc comments will likely be sparse. To use the functionality of flagonfly in other projects, look into importing necessary functions and packages from flagonfly.core.

CLI: Subcommands

Help

Flagonfly contains detailed help messages for commands and their parameters wherever possible. Use the --help flag on any command to see detailed descriptions of the arguments.

This is important because this README will likely be updated less often and less thoroughly than the help messages themselves.

Encode/decode

Use flagonfly encode or flagonfly decode followed by a format to convert data to different formats.

For example, echo "Hello, world!" | flagonfly encode binary will encode the ASCII text into binary and output it as a string of "1"s and "0"s. The decode command does the reverse.

If an encoding isn't specified when decoding, flagonfly will attempt to guess at what encoding was used. It does this by attempting to decode using various encodings in order until one succeeds. This is not foolproof; if you data was encoded in a larger format but using only certain digits (e.g. data encoded as hex that only uses 1s and 0s), it will decode incorrectly. However, it's good enough as a first try for decoding data quickly.

Words and separators

By default, the output of encode is divided into words, separated by a separator string. There are sensible defaults for all data types, and the separator/word length parameters are ignored when encoding to base64/32/16.

To change the separator, pass a string to the -s/--separator option. To remove the separator, pass an empty string: flagonfly encode -s "" ....

To change the word size, use the -w or --word-length option.

Prefixes

The -p/--prefix option can be used to prepend a prefix (e.g. 0b for binary data). When using no separator, this prefix is appended to the beginning of the output. When using a separator between words, it will be appended to the beginning of each word.

There is no prefix for base64/32/16 data.

CI Usage

The flagonfly project leverages Codeberg's hosted woodpecker instance for continuous integration: running unit tests on all PRs to main and running an automatic publish workflow to publish the project to PyPI automatically whenever a new release is created on Codeerg.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flagonfly-0.0.3.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flagonfly-0.0.3-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file flagonfly-0.0.3.tar.gz.

File metadata

  • Download URL: flagonfly-0.0.3.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for flagonfly-0.0.3.tar.gz
Algorithm Hash digest
SHA256 b45d193286a8e19cca0b5e80ad5311b541886d9dff84ac93868677c4667f631e
MD5 274b132eb100b14257f0fd6a6c6012d4
BLAKE2b-256 1e9f3070b920047f509641db4fa1f52c12dc7b831531c023ff1137561cfa778c

See more details on using hashes here.

File details

Details for the file flagonfly-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: flagonfly-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for flagonfly-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 66dff5adacfe6b398297511f1d6c4ff8d3ba6cc1049a34ccfc93395745c28952
MD5 a9cd8c09150df3b197ca6358a8ef5192
BLAKE2b-256 1a6aedfe995d633346deea95d78d7fd36538f25e392bd7d64b9e0b01925b4464

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page