Skip to main content

A modular CTF/crypto library toolkit for encodings, classic ciphers, and autodetection. CLI included :3.

Project description

decodr

A modular CTF/crypto library toolkit for encodings, classic ciphers, and autodetection. CLI included :3.

decodr is a Python package that lets you encode, decode, encrypt or decrypt text using classical, polyalphabetic, modern, and stream ciphers, all through a Python API and a CLI interface


Features:

  • classical ciphers: (caesar, atbash, affine, rot13, substitution)
  • polyalphabetic: (vigenere, autokey_vigenere, beaufort, playfair)
  • fractionation: (bifid, ADFGX)
  • transpos9ition: (railfence, columnar)
  • stream: (xor, repeating xor, rc4)
  • modern: (aes, rsa, hash utilities)
  • encodings: (b32, b64, hex, URL-safe)
  • detection & utils: (file magic detection, I/O helpers)
  • cli interface

Installation

pip install decodr

Usage

CLI interface

You can use any cipher module directly with Python's -m flag:

# caesar cipher, 
python3 -m decodr.ciphers.classical.caesar encrypt "HELLO" 3
# -> KHOOR

python3 -m decodr.ciphers.classical.caesar decrypt "KHOOR" 3
# -> HELLO

Python API

from decodr.ciphers.classical import caesar
from decodr.ciphers.polyalphabetic import vigenere

print(caesar.encrypt("HELLO", 3))
# KHOOR

print(vigenere.encrypt("HELLOWORLD", "KEY"))
# RIJVSUYVJN

Or load dynamically using the global registry:

from decodr import load_module

mod = load_module("adfgx")
ciphertext = mod.encrypt("DEFEND THE EAST WALL", "FORTIFICATION", "CIPHER")
print(mod.decrypt(ciphertext, "FORTIFICATION", "CIPHER"))

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

pydecodr-0.1.0.tar.gz (21.7 kB view details)

Uploaded Source

Built Distribution

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

pydecodr-0.1.0-py3-none-any.whl (36.1 kB view details)

Uploaded Python 3

File details

Details for the file pydecodr-0.1.0.tar.gz.

File metadata

  • Download URL: pydecodr-0.1.0.tar.gz
  • Upload date:
  • Size: 21.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pydecodr-0.1.0.tar.gz
Algorithm Hash digest
SHA256 87fba06dd72cda9f3866f54415c563e09353b51924c19312d66eeeb4d4e667b8
MD5 e2140f822a5587bf6cda6eae42e15f23
BLAKE2b-256 b2fa15a37416d69897d8e416a77961cd2e8c79eb01b7f5b86b8c78cc6c59531f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydecodr-0.1.0.tar.gz:

Publisher: python-publish.yml on xndadelin/decodr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pydecodr-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pydecodr-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 36.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pydecodr-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3dc22415b2fcb7e03d6826f0b067269b9c2871eb42fbe0c31b589ceb9b45cfdc
MD5 15d145dda8c182ca1f8d365c1d29064f
BLAKE2b-256 366c9e68b84739086e635d616df9b81518df734367d0206372668efec28fb614

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydecodr-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on xndadelin/decodr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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