> 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/2025/404ctf-2025/securite-materielle/trop-diq.md).

# Trop d'IQ

**Catégorie:** Sécurité matérielle - **Difficulté:** Intro

{% file src="/files/EXxW52DS6QZx5CCU5BJX" %}

**Description:**

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

Solution:

Pour ce challenge d'intro, il fallait réussir à convertir ce fichier .iq (signal audio) en un audio compréhensible par l'oreille humaine.

En sachant cela, j'ai créé un script qui fait tout ça automatiquement :&#x20;

```python
import numpy as np
from scipy.io.wavfile import write

# Paramètres
input_file = "chall.iq"
output_file = "output.wav"
sample_rate = 44100  # Hz

# Lire IQ comme complex128 (résultat d'une FFT)
fft_data = np.fromfile(input_file, dtype=np.complex128)

print(f"[+] Chargé {len(fft_data)} coefficients FFT depuis '{input_file}'")

# Revenir au domaine temporel
time_data = np.fft.ifft(fft_data)

# Garder uniquement la partie réelle
audio_signal = np.real(time_data)

# Normaliser entre -1 et 1
audio_signal /= np.max(np.abs(audio_signal))

# Convertir en float32
audio_signal = audio_signal.astype(np.float32)

# Sauvegarder le son
write(output_file, sample_rate, audio_signal)

print(f"[+] Signal reconstruit et sauvegardé dans '{output_file}'")
```

Et en sortie, nous avons un bel audio bien propre que nous pouvons écouter :&#x20;

{% file src="/files/qJkET02GwUJlOthQ7PGZ" %}

<details>

<summary>🚩FLAG</summary>

`404CTF{45d05a87}`

</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/2025/404ctf-2025/securite-materielle/trop-diq.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.
