> For the complete documentation index, see [llms.txt](https://cajac.gitbook.io/ctf-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cajac.gitbook.io/ctf-notes/encoding-and-decoding/morse-code.md).

# Morse code

**Morse code** is a [telecommunications](https://en.wikipedia.org/wiki/Telecommunications) method which [encodes](https://en.wikipedia.org/wiki/Character_encoding) [text](https://en.wikipedia.org/wiki/Written_language) characters as standardized sequences of two different signal durations, called *dots* and *dashes*, or *dits* and *dahs*. Morse code is named after [Samuel Morse](https://en.wikipedia.org/wiki/Samuel_Morse), one of the early developers of the system adopted for [electrical telegraphy](https://en.wikipedia.org/wiki/Electrical_telegraph).

## Convert audio

These online services can be used to decode morse code in audio files:

* MorseCode.World: <https://morsecode.world/international/decoder/audio-decoder-adaptive.html>
* DataBorder.com: <https://databorder.com/transfer/morse-sound-receiver/>

## Convert text

These online services can be used to decode/encode morse code in text:

* CyberChef: <https://gchq.github.io/CyberChef/#recipe=From_Morse_Code('Space','Line%20feed')>
* Lexilogos: <https://www.lexilogos.com/keyboard/morse.htm>

## Convert with Binary Refinery

You can convert to/from morse code with [morse](https://binref.github.io/#refinery.morse) from Binary Refinery

```bash
┌──(kali㉿kali)-[~]
└─$ source ~/Python_venvs/Binary_Refinery/bin/activate

┌──(Binary_Refinery)─(kali㉿kali)-[~]
└─$ emit '... --- ...' | morse  
sos

┌──(Binary_Refinery)─(kali㉿kali)-[~]
└─$ emit 'This is a test' | morse -R
- .... .. ...   .. ...   .-   - . ... -
```

## Resources

Binary Refinery - Documentation: <https://binref.github.io/>

Binary Refinery - GitHub: <https://github.com/binref/refinery/>

Morse code - Wikipedia: <https://en.wikipedia.org/wiki/Morse_code>
