Multi-format encoding/decoding CLI with recursive layer detection for security analysis.
Project description
██████╗ ██████╗ ██╗ ██╗████████╗ ██████╗ ██████╗ ██╗
██╔══██╗██╔════╝ ██║ ██║╚══██╔══╝██╔═══██╗██╔═══██╗██║
██████╔╝███████╗ ███████║ ██║ ██║ ██║██║ ██║██║
██╔══██╗██╔═══██╗╚════██║ ██║ ██║ ██║██║ ██║██║
██████╔╝╚██████╔╝ ██║ ██║ ╚██████╔╝╚██████╔╝███████╗
╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝
- Multi format encoding/decoding CLI with recursive layer detection for security analysis.
Features
- Encode/Decode across Base64, Base64URL, Base32, Hex, and URL encoding formats
- Auto-detect encoding format with confidence scoring
- Peel recursively through multi-layered encoding (the kind attackers use to evade WAFs and IDS)
- Chain multiple encoding steps together for testing obfuscation patterns
- Pipeline-friendly output for integration into security workflows
Quick Start
uv sync
uv run b64tool encode "Hello World"
uv run b64tool decode "SGVsbG8gV29ybGQ="
uv run b64tool detect "SGVsbG8gV29ybGQ="
uv run b64tool peel "NjQ0ODY1NmM2YzZmMjA1NzZmNzI2YzY0"
uv run b64tool chain "secret" --steps base64,hex,url
Installation
uv sync --all-extras
Usage
Encode
b64tool encode "Hello World" # Base64 (default)
b64tool encode "Hello World" --format hex # Hex
b64tool encode "Hello World" --format base32 # Base32
b64tool encode "hello world&foo=bar" --format url # URL encoding
echo "piped input" | b64tool encode # Stdin
b64tool encode --file secret.txt # File input
Decode
b64tool decode "SGVsbG8gV29ybGQ=" # Base64 (default)
b64tool decode "48656c6c6f" --format hex # Hex
b64tool decode "JBSWY3DP" --format base32 # Base32
Detect
Identifies the encoding format with confidence scoring:
b64tool detect "SGVsbG8gV29ybGQ="
Peel (Recursive Layer Detection)
The signature feature. Automatically peels back multiple encoding layers, the way real malware and attack payloads obfuscate data:
b64tool peel "NjQ0ODY1NmM2YzZmMjA1NzZmNzI2YzY0"
Chain
Build multi-layered encodings for testing WAF rules, IDS signatures, or understanding obfuscation:
b64tool chain "alert('xss')" --steps base64,hex,url
Security Context
Encoding layering is a real attack technique:
- WAF Bypass: Double-encoding payloads to slip past web application firewalls (OWASP)
- Malware Obfuscation: DARKGATE malware uses custom Base64 alphabets with randomized shuffling
- Data Exfiltration: Base64-encoded data hidden in DNS queries and HTTP headers
- IDS Evasion: Multi-layer encoding to avoid signature-based detection
This tool helps security professionals analyze and understand these patterns.
License
MIT
Project details
Release history Release notifications | RSS feed
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 b64tool-0.1.0.tar.gz.
File metadata
- Download URL: b64tool-0.1.0.tar.gz
- Upload date:
- Size: 48.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9915d58cec5a785b66740960ce80dc4c31708911644ffaa7bea1bff5ecfa96a5
|
|
| MD5 |
29b98fb1b1f1d9fb7e36076d7bc81609
|
|
| BLAKE2b-256 |
730d0237cb2a31b1f04ecee8d88604fe3968d250f9c1c5e8162224679883ae8c
|
Provenance
The following attestation bundles were made for b64tool-0.1.0.tar.gz:
Publisher:
publish-base64-tool.yml on CarterPerez-dev/Cybersecurity-Projects
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
b64tool-0.1.0.tar.gz -
Subject digest:
9915d58cec5a785b66740960ce80dc4c31708911644ffaa7bea1bff5ecfa96a5 - Sigstore transparency entry: 930123253
- Sigstore integration time:
-
Permalink:
CarterPerez-dev/Cybersecurity-Projects@d1abda4e7099d24e014e6ebc4165dbd0b7cf68b9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/CarterPerez-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-base64-tool.yml@d1abda4e7099d24e014e6ebc4165dbd0b7cf68b9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file b64tool-0.1.0-py3-none-any.whl.
File metadata
- Download URL: b64tool-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.9 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 |
19dc36c79b0691c196edd7a8c6f51b29c09548bd3123edf37f6b8044ad7e905e
|
|
| MD5 |
7f8cfcb64bf0cd01574593a329823fa7
|
|
| BLAKE2b-256 |
9096a270fe59a845862741eea3438b6f14c0509e68b97f07113f32a4ce9ceb56
|
Provenance
The following attestation bundles were made for b64tool-0.1.0-py3-none-any.whl:
Publisher:
publish-base64-tool.yml on CarterPerez-dev/Cybersecurity-Projects
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
b64tool-0.1.0-py3-none-any.whl -
Subject digest:
19dc36c79b0691c196edd7a8c6f51b29c09548bd3123edf37f6b8044ad7e905e - Sigstore transparency entry: 930123262
- Sigstore integration time:
-
Permalink:
CarterPerez-dev/Cybersecurity-Projects@d1abda4e7099d24e014e6ebc4165dbd0b7cf68b9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/CarterPerez-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-base64-tool.yml@d1abda4e7099d24e014e6ebc4165dbd0b7cf68b9 -
Trigger Event:
push
-
Statement type: