> For the complete documentation index, see [llms.txt](https://writeups.ayweth20.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://writeups.ayweth20.com/2023/404ctf-2023/steganographie/odobenus-rosmarus.md).

# Odobenus Rosmarus

**Catégorie:** Stéganographie - **Difficulté:** Intro

**Description:**

<figure><img src="/files/bjqYL6xQVYUBcIUZnHRw" alt=""><figcaption></figcaption></figure>

> Ce soir je Célèbre Le Concert Electro Comme Louis Et Lou. Comme La nuit Commence Et Continue Clairement, Et Clignote Lascivement il Chasse sans Chausser En Clapant Encore Classiquement Les Cerclages du Clergé. Encore Car Encore, Louis Lou Entamant Longuement La Lullabile En Commençant Le Cercle Exhaltant de Club Comique Cannais Et Clermontois.

**Solution:**

Pour ce challenge d'intro à la stéganographie il fallait bien se creuser la tête pour trouver une logique dans le texte donné.

En lisant le texte il n'y avait rien d'intéressant à en tirer. Mais en regardant le texte nous remarquons directement qu'il y a des lettres (C, L et E) qui sont très souvent en majuscules.

Mais que peuvent bien signifier ces lettres majuscules ?\
Si nous regardons TOUS les éléments du chall, il y a un titre (que nous oublions souvent...).\
Et en cherchant le titre sur internet nous tombons là dessus : <br>

<figure><img src="/files/ASgM8pe9CVXPMQnMgTxw" alt="" width="563"><figcaption></figcaption></figure>

Et là, ça tilte tout de suite (enfin normalement).\
L, C et E ont des significations bien particulières : L => Long (tiret), C => Court (point) et E => Espace

Maintenant que nous savons ça, il n'y a plus qu'à faire le tri dans le texte pour ne garder que ces majuscules et les remplacer ces majuscules par les bons caractères.\
Voici donc un petit script qui le fait à notre place :&#x20;

```python
uppercase = []
morse = []

def keepUppercase(text):
    for c in text:
        if c.isupper():
            uppercase.append(c)
    return uppercase

def changeCharacters(text):
    for c in text:
        if c == 'C':
            morse.append('.')
        elif c == 'L':
            morse.append('-')
        elif c == 'E':
            morse.append(' ')
    print(''.join(morse))

changeCharacters(keepUppercase("Ce soir je Célèbre Le Concert Electro Comme Louis Et Lou. Comme La nuit Commence Et Continue Clairement, Et Clignote Lascivement il Chasse sans Chausser En Clapant Encore Classiquement Les Cerclages du Clergé. Encore Car Encore, Louis Lou Entamant Longuement La Lullabile En Commençant Le Cercle Exhaltant de Club Comique Cannais Et Clermontois."))
```

Ce script nous renvoie le morse suivant : *`..-. .- -.-. .. .-.. . .-.. . -- --- .-. ... .`* et nous n'avons plus qu'à le convertir en ASCII grâce à [cet outil](https://www.lexilogos.com/clavier/morse.htm).

Voici donc le résultat : <br>

<figure><img src="/files/hgLdtab77T9Vs3qVVSD7" alt="" width="563"><figcaption></figcaption></figure>

Ne reste plus qu'à mettre le texte en minuscule et nous avons le flag.

<details>

<summary>🚩 FLAG</summary>

```
404CTF{facilelemorse}
```

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://writeups.ayweth20.com/2023/404ctf-2023/steganographie/odobenus-rosmarus.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
