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)
- 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 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"))
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pydecodr-0.1.1.tar.gz.
File metadata
- Download URL: pydecodr-0.1.1.tar.gz
- Upload date:
- Size: 21.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78a220b47b74cd836cbb6a52c3a1d67dfcf23759a3967ee3b74cd9ad2d75a296
|
|
| MD5 |
e799ff1a9472f3348369b2c00f4ed855
|
|
| BLAKE2b-256 |
e2fde0cdb1298d9e8844ac5e74952b603a0cffc6ce2de3d342d22f86f69c3ac6
|
Provenance
The following attestation bundles were made for pydecodr-0.1.1.tar.gz:
Publisher:
python-publish.yml on xndadelin/pydecodr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pydecodr-0.1.1.tar.gz -
Subject digest:
78a220b47b74cd836cbb6a52c3a1d67dfcf23759a3967ee3b74cd9ad2d75a296 - Sigstore transparency entry: 654927551
- Sigstore integration time:
-
Permalink:
xndadelin/pydecodr@a22877f5776670bf106579e1cde8debbde9d21bc -
Branch / Tag:
refs/tags/v0.1.0-alpha - Owner: https://github.com/xndadelin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@a22877f5776670bf106579e1cde8debbde9d21bc -
Trigger Event:
release
-
Statement type:
File details
Details for the file pydecodr-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pydecodr-0.1.1-py3-none-any.whl
- Upload date:
- Size: 36.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88119ed004303c8bc193621d0981d0d3c4ba2b3add2715f567c0ce4a28872453
|
|
| MD5 |
b8c76eebfe3de1535fa6055a8f8389a4
|
|
| BLAKE2b-256 |
737a98915b7290bac62d7cffa129f46e7224588055337fc6ad0d7073d1c64efe
|
Provenance
The following attestation bundles were made for pydecodr-0.1.1-py3-none-any.whl:
Publisher:
python-publish.yml on xndadelin/pydecodr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pydecodr-0.1.1-py3-none-any.whl -
Subject digest:
88119ed004303c8bc193621d0981d0d3c4ba2b3add2715f567c0ce4a28872453 - Sigstore transparency entry: 654927561
- Sigstore integration time:
-
Permalink:
xndadelin/pydecodr@a22877f5776670bf106579e1cde8debbde9d21bc -
Branch / Tag:
refs/tags/v0.1.0-alpha - Owner: https://github.com/xndadelin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@a22877f5776670bf106579e1cde8debbde9d21bc -
Trigger Event:
release
-
Statement type: