write-ups-challenges-2022-2023/mom-what-are-we-eating-today/SOLUTION.md
2022-11-24 22:59:22 +01:00

43 lines
2.4 KiB
Markdown

# How To Solve
1) The files 3pm.x84.2 and 3pm.y74.3- are 2 mp3 files that should be reversed (in name and in audio).
This can be done by the following cmd for example: `sox 3pm.x84.2 file2.84x.mp3 reverse`
2) Now you will have 2 audio files that describe a huge number that you will need to convert in digits.
You could use a speech to text convert like the [Vosk-api](https://github.com/alphacep/vosk-api/) to make the task easier.
To Do so:
- First convert the mp3 files into wav format:
`ffmpeg -i file2.84x.mp3 file2.84x.wav`
- Then install vosk via pip:
`pip3 install vosk`
- Then clone the vosk repo and download a english model:
```
git clone https://github.com/alphacep/vosk-api
cd vosk-api/python/example
wget https://alphacephei.com/vosk/models/vosk-model-en-us-0.22.zip
unzip vosk-model-en-us-0.22.zip
mv vosk-model-en-us-0.22.zip model
python3 ./test_simple.py test.wav > result.json
```
Other models could be found [here](https://alphacephei.com/vosk/models).
- Now You will have a json file with the result that can be found in the json "text" blocks.
The numbers should be correctly transcribed except for a few of the larger numbers.
This ones will probably need to be manually corrected.
- Once you can write a python script that convert large number words into numbers (use a list like [this one](https://en.wikipedia.org/wiki/Names_of_large_numbers) for reference)
or use a tool with the same capability on the internet (like [this one](https://codebeautify.org/word-to-number-converter)).
3) After this you will have 2 large numbers of 50 digits.
You will use this numbers to create a coordinate.
This can be done by using the reversed file name.
For example for the file 3pm.y74.3- it will be -3.47y.mp3.
Which means a negative number with 3 digits before the decimal point,
48 digits after the decimal point and y means it's the y-coordinate.
4) if everything is done correctly you should get the coordinate:
43.568203645634485382241100258703131642483581332123, -116.77239845463438156511102435434249128141577257065
5) Plug this coordinate into google maps and you will end up on the "Chicken Dinner Rd".
This you know we will eat a chicken dinner, creating the Flag IGCTF{ChickenDinnerRd}.
## Flag
IGCTF{ChickenDinner}