Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🔐 Cipher‑Deck

Multi‑Layer Cipher Identifier & Decoder

Python License Platform No Dependencies


🧠 What is Cipher‑Deck?

Cipher‑Deck is a pure‑Python tool that automatically detects and decodes chains of common encodings – Base64, Hex, URL‑encoding, Binary, Octal, ROT13, and even Reverse.

It is designed for:

  • 🏁 CTF players – quickly unwrap nested flags
  • 🦠 Malware analysts – deobfuscate suspicious strings
  • 🔍 Security researchers – inspect encoded payloads

No external libraries – only Python’s standard library.
No installation – just run the script.


✨ Features

  • Auto‑detection – identifies the encoding type without user hints
  • 🔁 Iterative decoding – unwraps layer after layer until a human‑readable string is reached
  • 🌈 Coloured terminal output – clean, readable reports
  • 🧩 Smart heuristics – stops when the text looks “natural”
  • 📦 Portable – single file, zero dependencies

📦 Installation

Clone the repository:

git clone https://github.com/Arad883/Cipher-Deck.git

That's it! No pip install required.


🚀 Usage

Command‑line mode

python3 cipher_deck.py "SGVsbG8gV29ybGQ="

Interactive mode

python3 cipher_deck.py
# then paste your obfuscated string

🧪 Examples

  1. Binary → ASCII

Input:

01001000 01100101 01101100 01101100 01101111

Output:

Layer 1: Binary → Hello
✅ Final decoded result: Hello

  1. Hex → Base64 → Text

Input:

5a6d467a6157356c5a773d3d

Output:

Layer 1: Hex → ZmFzaW5lZw==
Layer 2: Base64 → fasinge
✅ Final decoded result: fasinge

  1. URL‑encoded string

Input:

%4e%61%7a%61%6e%69%20%6d%61%64%61%72%20%63%68%69%73%74%65%3f

Output:

Layer 1: URL-Decode → Nazani madar chiste?
✅ Final decoded result: Nazani madar chiste?

🛠 How it works

  1. The string is passed to the CipherDecoder class.
  2. It iteratively tries to detect one of the supported encodings.
  3. If a match is found, it decodes that layer and repeats.
  4. The process stops when: · The string becomes human‑readable (≥70% printable ASCII), or · No further decoding is possible.
  5. A detailed layer‑by‑layer report is printed to the terminal.

⚠️ Ethical Disclaimer

This tool is intended for:

· Legitimate security research · Educational purposes · CTF competitions · Recovering your own lost data

Do not use it:

· To access systems or data without explicit written permission · For any illegal or malicious activity

The author assumes no responsibility for misuse. Use it responsibly.


🤝 Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request for:

· New cipher/encoding support (e.g., Base58, XOR, etc.) · Performance improvements · Better heuristics


📄 License

This project is licensed under the MIT License – see the LICENSE file for details.


⭐ Show Your Support

If you find this tool useful, please give it a ⭐ on GitHub – it helps others discover it!


Happy decoding! 🔓