Dvd848/CTFs

Regarding picoCTF2019 general skill - the rockstar lang related problem

Peiqi-Hu opened this issue · 2 comments

Hi there,

This question may be a bit silly, but it does bother me.
I was doing the problem called ' 1_wanna_b3_a_r0ck5tar '. I have confusion regarding '-'(hyphen) under the poetic number literals part. Based on your solution, correct me if I misunderstood. '-' is kind like separation sign so that 'six-string' is '3' and '6' which although adds up to 10, with '-' we can get 3 and 6 instead of 0. This makes sense to me when it applies to the Music=1970.

However, when I converted the txt to the py using the same package, I got results below.
rockstar

In which, 'a six-string' = 10, 'a billboard-burning razzmatazz' = 170. Based on the first half definition, six-string sounds right, but the later one doesn't make sense to me. And I do not fully understand the meaning of '13 letters > 3'.
rk

I had tried different combinations, results are attached below.
rk2
rk3

Thank you in advance.

Hi,

I think the language specs have been modified.
Going back to a copy of the specs captured on May 21 2019, I don't see any mention of a hyphen or the "all-consuming" example. Back then, "a six-string" would have been interpreted as "136".
This special case was added at a later stage, probably to make coding easier (or as the specs put it, "so you can use terms like ‘all-consuming’ (13 letters > 3) and ‘power-hungry’ (12 letters > 2) instead of having to think of 12- and 13-letter words").

I would read the examples as:

  • ‘all-consuming’ (13 letters -> 3)
  • ‘power-hungry’ (12 letters -> 2)

i.e. the right hand side value is after performing the Mod 10 operation.

Therefore, according to today's specs, the answer would be:

10
170

That makes sense.

Thank you very much for your help. XD