Skip to main content

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

Project description

pydecodr

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

pydecodr 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, hill, polybius, 4square, bacon)
  • polyalphabetic: (vigenere, autokey_vigenere, beaufort, playfair, gronsfeld)
  • fractionation: (bifid, ADFGX, trifid, ADFGVX)
  • transposition: (railfence, columnar, double transposition, myszkowski, route)
  • stream: (xor, repeating xor, rc4)
  • modern: (aes, rsa, hash utilities)
  • encodings: (b32, b64, hex, URL-safe, morse, base85)
  • detection & utils: (file magic detection, I/O helpers)
  • cli interface

Installation

pip install pydecodr

Usage

CLI interface

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

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

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

Python API

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

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

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

Or load dynamically using the global registry:

from pydecodr import load_module

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

Check this for more usage: usage

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.4.tar.gz (34.6 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.4-py3-none-any.whl (65.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pydecodr-0.1.4.tar.gz
  • Upload date:
  • Size: 34.6 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.4.tar.gz
Algorithm Hash digest
SHA256 4dfaaf8a36fa51c0183c8acc16dade86ce62bbdf37d04c11383883d8f8b4da9a
MD5 a4c128990a3f66b2d9701f8b6ed3b67c
BLAKE2b-256 96ab465b3cebb75e5283baf8e18b2cec1d1d18d66556cc5f05da66cc8abdb244

See more details on using hashes here.

Provenance

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

Publisher: python-publish.yml on xndadelin/pydecodr

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.4-py3-none-any.whl.

File metadata

  • Download URL: pydecodr-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 65.9 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1e10482007d31f660d09b3a4ed2f4daf1a5898aa1d129dcc6aee5c642afcfa03
MD5 31fd179c98ce2d903233dff3515f29e1
BLAKE2b-256 daa4fbda7d0335311c8cbc6718eb15a1abde07ac36c4873c5ac964b1dbc23875

See more details on using hashes here.

Provenance

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

Publisher: python-publish.yml on xndadelin/pydecodr

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