Skip to content

ShakalBhau0001/Morse-Decoder-CLI-Lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

🔤 Morse-Decoder-CLI-Lab 🧠

A Python-based Morse Code Command Line Tool that allows you to convert text into International Morse Code and decode Morse code back into readable text. This project is designed as a learning lab to improve:

  • Encoding & decoding logic
  • Pattern recognition
  • Handling symbol-based communication systems
  • CLI tool structuring

It is especially useful for puzzle solving, CTF-style thinking, and foundational cybersecurity logic building.


🧱 Project Structure

Morse-Decoder-CLI-Lab/
│
├── morse_decoder.py        # Main CLI application
└── README.md               # Project documentation

✨ Features

🔐 Text → Morse Conversion

  • Converts letters, numbers, and punctuation into International Morse Code
  • Uses standard dot (.) and dash (-) notation
  • Represents word gaps using /

🔓 Morse → Text Decoding

  • Decodes space-separated Morse code
  • Converts / back into spaces
  • Ignores unsupported or invalid sequences safely

🧪 Learning-Oriented Design

  • Clean dictionary-based mapping
  • Easy-to-read conversion logic
  • Ideal for experimentation and extension

🛠 Technologies Used

Technology Role
Python 3 Core programming language
Dictionary Mapping Morse ↔ Text conversion
CLI (Command Line Interface) User interaction

No external libraries are required.


📌 Requirements

Python 3.7+

This tool uses only standard Python libraries.


▶️ How to Run

1️⃣ Clone the repository

git clone https://github.com/ShakalBhau0001/Morse-Decoder-CLI-Lab.git

2️⃣ Enter the project directory

cd Morse-Decoder-CLI-Lab

3️⃣ Run the CLI tool

python morse_decoder.py

▶️ Usage

After running the program, you will see:

🔤 International Morse Code 🔤
--------------------
1. Text → Morse
2. Morse → Text

🔐 Text → Morse Example

Input:

HELLO WORLD

Output:

.... . .-.. .-.. --- / .-- --- .-. .-.. -..

🔓 Morse → Text Example

Input:

.... . .-.. .-.. --- / .-- --- .-. .-.. -..

Output:

HELLO WORLD

⚙️ How It Works

1️⃣ Morse Mapping

  • A dictionary maps characters to Morse symbols:
    "A": ".-", "B": "-...", "C": "-.-."

2️⃣ Encoding

  • Input text is converted to uppercase
  • Each character is replaced by its Morse equivalent
  • Output is space-separated Morse code

3️⃣ Decoding

  • Morse input is split by spaces
  • Reverse dictionary lookup converts Morse back to text
  • / is translated back into a space

⚠️ Limitations

  • Morse input must be space-separated
  • Continuous Morse without spacing is ambiguous
  • This tool does not brute-force spacing
  • Not intended for secure communication

🌟 Future Enhancements

  • Auto-spacing / brute-force decoding
  • Support for continuous Morse (no spaces)
  • File-based input/output
  • Morse signal visualization
  • Integration with steganography tools

📦 Extended / Combined Tools

This repository focuses only on Morse code encoding & decoding as a logic-building CLI lab.

For a combined and advanced implementation involving:

  • Image steganography
  • Audio steganography
  • Encrypted payload embedding

please refer to:

🔗 StegaVault-CLI


⚠️ Disclaimer

This project is intended for educational and learning purposes only.

Morse code is not encryption and should not be used for secure communication. The goal is to improve analytical thinking, decoding skills, and tool-building fundamentals.


🪪 Author

Creator: Shakal Bhau

GitHub: ShakalBhau0001


About

A Python command-line Morse code encoder and decoder for converting text to International Morse code and back. Built as a learning-focused CLI lab to practice encoding/decoding logic, dictionary-based mappings, and analytical thinking for puzzles and CTF-style challenges.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages