Musical Penguins (45 pts)

Solved by: traw123, xand, sardinachanx, zookham

Problem:

This file is a complete mystery to me, I've never seen notes like these!

Files:

mystery.tg

Hint:

Morgan Freeman and Kevin Spacey would have fun with this one.

Solution:

.tg is a type of music sheet file, so we opened it and found this:

Somehow there were only two notes - E and C. We guessed that it must either represent binary, or the notes themselves were some kind of pattern. The other curious thing was that they were in groups of 5. After some trial-and-error we realized that it must have been Morse code - Morgan Freeman and Kevin Spacey were in a movie named "Se7en" together and the note arrangement corresponds to 0-6 of the Morse Code. After mapping the values, we obtained a bunch of numbers in base 7. Converting them to base 10, we obtained a bunch of ASCII-like values so e transcribed that and got the flag!

Sample Code:

>>> [223, 201, 224, 204, 234, 100, 164, 225, 104, 102, 202, 164, 224, 66, 164, 214, 103, 212, 102, 164, 214, 224, 104, 100, 201, 164, 230, 100, 224, 206, 164, 224, 206, 100, 104, 103, 213, 213, 164, 224, 206, 102, 164, 224, 100, 214, 102, 236]
[223, 201, 224, 204, 234, 100, 164, 225, 104, 102, 202, 164, 224, 66, 164, 214, 103, 212, 102, 164, 214, 224, 104, 100, 201, 164, 230, 100, 224, 206, 164, 224, 206, 100, 104, 103, 213, 213, 164, 224, 206, 102, 164, 224, 100, 214, 102, 236]
>>> l = _
>>> 
>>> [int(str(s), 7) for s in l]
[115, 99, 116, 102, 123, 49, 95, 117, 53, 51, 100, 95, 116, 48, 95, 109, 52, 107, 51, 95, 109, 116, 53, 49, 99, 95, 119, 49, 116, 104, 95, 116, 104, 49, 53, 52, 108, 108, 95, 116, 104, 51, 95, 116, 49, 109, 51, 125]
>>> [chr(int(str(s), 7)) for s in l]                                            
['s', 'c', 't', 'f', '{', '1', '_', 'u', '5', '3', 'd', '_', 't', '0', '_', 'm', '4', 'k', '3', '_', 'm', 't', '5', '1', 'c', '_', 'w', '1', 't', 'h', '_', 't', 'h', '1', '5', '4', 'l', 'l', '_', 't', 'h', '3', '_', 't', '1', 'm', '3', '}']
>>> "".join(_)
'sctf{1_u53d_t0_m4k3_mt51c_w1th_th154ll_th3_t1m3}'
>>> ord('t')
116
>>> 116/7
16.571428571428573
>>> 16/7
2.2857142857142856
>>> 116%7
4
>>> int('224',7)
116
>>> sctf{1_u53d_t0_m4k3_mu51c_w1th_th154ll_th3_t1m3}

FLAG: sctf{1_u53d_t0_m4k3_mu51c_w1th_th154ll_th3_t1m3}