Tags: crypto 

Rating:

# -.-

We're given a text file with a bunch of dih-s, dah-s, and di-s. Looks like Morse Code. Let's download the file so we can work with it from our terminal.

```
$ wget https://tamuctf.com/files/cd5fef538fad2500c30c4ea389c50244/flag.txt
```

In Morse Code, dih, dit, and di represent a dot. Dah represents a dash. This is a Python script I whipped up to turn this phonetic Morse Code into dots-and-dashes Morse Code.

```python
#!/usr/bin/env python3

with open("flag.txt", "r") as f:
for char in f.read().split():
morse = "".join([ "." if "di" in c else "-" for c in char.split("-") ])
print(morse, end=" ")

print()
```

![](https://raw.githubusercontent.com/shawnduong/ctf-writeups/master/2019-TAMU/images/-.--1.png)

When we plug it into a [Morse Code translator](https://morsecode.scphillips.com/translator.html), we seem to get back hexadecimal.

![](https://raw.githubusercontent.com/shawnduong/ctf-writeups/master/2019-TAMU/images/-.--2.png)

No problem. We'll just plug it into a [hexadecimal translator](https://www.rapidtables.com/convert/number/hex-to-ascii.html).

![](https://raw.githubusercontent.com/shawnduong/ctf-writeups/master/2019-TAMU/images/-.--3.png)

Original writeup (https://github.com/shawnduong/ctf-writeups/blob/master/2019-TAMU/Crypto/-.-.md).