Katana is a lightweight, CyberChef-inspired Python framework designed for CTFs and rapid cryptography prototyping. It allows you to build data transformation pipelines using modular "Layers."
Katana requires pycryptodome. Ensure your environment is ready:
$ pip install pycryptodomeTo use Katana in your scripts while you are still developing it, install it in editable mode. This allows your changes to the source code to take effect immediately without re-installing.
From the root directory:
$ pip install -e .Building a pipeline in Katana is as simple as stacking layers.
from katana import Pipeline
from katana.layers import Encode, Decode
# Define your data
secret = "Hello World"
# Build the pipeline (CyberChef style)
pipeline = Pipeline([
Encode("base64"),
# Add more layers here
])
# Execute
result = pipeline.execute(secret)
print(f"Output: {result}")katana/: The core package containing the Pipeline and Layer logic.
examples/: Sample scripts to get you started.