9
$\begingroup$

Yesterday, I organized a contest with various challenges the participants had to solve. I put 6 very simple puzzles that were solved almost instantly, and the deadline was supposed to be until Sunday. So, while the fastest user was figuring out the last puzzle (The hardest one, had to do with reverse-engineering), I made another one. This one made him give up after several hours, and now he's blaming me for torturing him with these challenges.

Before giving the puzzle itself, I must say that the solution to all challenges in the competition was a "flag" with this syntax: ABcD-1234-ABcdEFGhIJ, where letters can be upper- or lowercase, but the dashes stay where they are (They are constant).

Anyways, here's the final challenge.

+:.++++++++++++.+.++++.++++++++++.+++++++++++.+.+.+++++++++.+.+.+++++.++++++.+.++++.++.+.+.+.+.+.+.+.+.+.+.++++++++.+.+.+.++++++++++++++++++++.++++.+.++.+.+++++++.+.+.++++++.+.+.+.+.+.+.+.++.++++++.++++.++.+.++++++.+.+++++.++.+++++.+.+.++++.+++++.+.+.++++++.+.+.+.+.++++.+.+.+++++++++++++++.
[:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------.+++++++++++++++++++.++++++++++++++.++++++++++++.+++++++++++.++++++++++++++++++++++++++++++++++++++++++++++++.++++++++++++++.++++++++++++++++++++++++.+++++++++++++.++++++++++++++.++++++++++++.++++++++++++++++.+++++++++++++.
-:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------.+.+.+.+.+.+.+.+.+++++++++.++.+.+.+.+.++++++.++.++.+.+++++++++.++.+++++++++++.+.+.+++++++++++++++++++++.+.+.+.+.+++++++.+.+.+.+.+.+.++.+.+.++.++.+.+.++++++++++++.+.+.+.++++++++.+++++++++++++.+.+.+++++++++++.+.+.++++++++++++.+.+++++++++++.++++++++.++++++++.++++++++++.+.++.+.+.+.+.
]:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------.++++++++++++++.+++++++++++++.+++++++++++.++++++++++++.+++++++++++++++++++++++++++++++++++++++++++++++.+++++++++++++++++.+++++++++++++++++++++.++++++++++++++.++++++++++++++.+++++++++++.++++++++++++++++.+++++++++++++++.
.:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------.++++++++++++++.++++++++++++.+++++++++++.+++++++++++++.++++++++++++.++++++.+++++.++++++++.++++.+++++++++++++.++++++++++++++++.+++++++++.++++++++++++.+++++++++++++.++.+++++++++++++.+++++++++++.+++++++++++++++.+++++++++++++++.
>:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------.+++++.++++++++++.++++.+++++++.++++++.+++++.++++++.+++++++.+++++.+++++++++++++++++++++++++++++++++++++++++++.++++.+++++++++++.++++++.+++++++++++++++++.++++.+++++++++.+++++.++++++++.++++++.+++++.++++++.++++++++++.++++++.++.+++++++++.++++.
<:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------.++++++++++++++.+++++++++++++.+++++++++++.++++++++++++.+++++++++++++++++++++++++++++++++++++++++++++++.+++++++++++++++++.+++++++++++++++++++++.++++++++++++++.++++++++++++++.+++++++++++.++++++++++++++++.+++++++++++++++.

The only hint given was brainf*ck, but not really. (The hint was not actually censored.) Good luck.

$\endgroup$
  • $\begingroup$ (I had a bunch of comments here pointing out various features of the given text. They were intended to help give ideas to people trying to solve this puzzle. Since I've solved it now, they're redundant and I've deleted them.) $\endgroup$ – Gareth McCaughan Aug 19 at 13:07
5
$\begingroup$

The "flag" is

sIlA-8370-fMUsNOyjMf.

What you need to do:

Run the whole thing as a pseudo-BF program, as follows. You kinda-sorta ignore the "prefix" at the start of each line. Your BF program then generates a bunch of numbers, one for each . operation. Treat these as specifing the positions in a new BF program where the operation in the "prefix" occurs. So e.g. the first few numbers generated are 0,12,13,17, and they are generated by a line starting with +; this tells us to put + operations in positions 0,12,13,17 in the new program we are generating.

Having done this

we get this program: +[--------->++<]>+.-[----->+<]>-.-[-->+++<]>.-[->+++<]>.+[--->++<]>+.+++++++++++.-----.++++.-------.---.-[--->+<]>++.++[---->+++<]>-.++++++++.+[--->+<]>+.++[--->++<]>.+.+[-->+++<]>+.[->+++<]>-.+++++[->+++<]>.>--[----->+<]>.

and

running this program produces the text given at the start of this answer.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.