CSE Puzzle Challenge - Puzzle 8 - Solution

Decoding Multi-Press

Some of you may remember what it was like to text before cell phones had full QWERTY keyboards. This challenge is a throwback to that time. There are many possible ways to decode this challenge; the following is simply one possibility.

Step 1:  Decoding the DTMF

To decode the DTMF the simplest method is to use a digital transmission decoder. The one we chose was Multimon-NG. This tool is included in the Kali Linux Tools or can be downloaded from Github https://github.com/EliasOenal/multimon-ng/

Using Multimon-NG to decode the DTMF:


Here the ‘-t’ tells multimon-ng the type of file we are handing it, the ‘-a’ adds the decoder we are looking to use, finally the ‘>>’ redirection will store the output in a local file.

Step 2: Multiple Possibilities of Multi-Press

Multi-Press can be decoded with the following chart:

MPM Chart image

Now depending on the type of phone you were using the <space> character was either on the ‘*’ or the ‘0’ key. For the purpose of this challenge we chose the ‘*’ key to represent <space>, but this can be easily determined by starting to decode and recognizing where the spaces belong.

The problem still arises that when two letters indicated by the same key are sequential in a word, the result may be misleading. For instance ‘a’ =2  and ‘b’ = 22 which can appear as ‘222’ however, ‘222’ also represents ‘c’. So how do we tell the difference??
Now those of you who remember texting in this manner will remember that an extended pause was required between typing two letters from the same key. For instance, “bat” would have been typed by pressing ‘22’ in quick sequence before pausing until the cursor was no longer highlighting the ‘b’, then typing ‘2’, ’8’.

If you re-evaluate the audio you will realize there are longer pauses between some tones. This is even simpler to evaluate if you open the .wav file in something like Audacity. You can note these pauses in your decoded DTMF by placing a value outside of the range 0-9 in the places where these pauses happen.

Finally, a simple python script can be written to convert the multi-press to its alphabetical representation.

Step 3: But wait!! We are not done!

Because there was such a variation on the punctuation characters “!-?@.” we hex encoded them in the text. So to complete the full decoding convert the following:

‘@’ = 0x40
‘.’ = 0x2e
‘-’ = 0x2d
‘!’ = 0x21
‘?’ = 0x3f

And that’s it, you have solved the puzzle!!      

Example Step 2 code (python): See decodeMultiPress.txt

This code requires a input list with the decoded DTMF tones called ‘input_txt’, using ‘X’ to indicate a pause in the multi-press sequence. This code also adjusts for the hex representation of the following punctuation characters “@-.!?”