Skip to content
Neale Pickett edited this page Oct 9, 2018 · 2 revisions

Earlier versions of MOTH had a "token" system. Tokens were of the form:

${category}:${points}:${nonce}

Where ${nonce} was a text string that uniquely identified the token, and made it difficult to brute-force attack the token space. We (Dirtbags) used bubblebabble encodings of 64-bit random data, but it could have been anything.

With MOTHv3, we realized that this was functionally equivalent to the current answer system: replace ${nonce} with ${answer} and the only remaining difference is formatting.

Because the answer endpoint wants category, points, and answer, we can craft JavaScript to read a token of the form:

${category}:${points}:${answer}

The JavaScript can pull this "token" apart and submit the three values to the answer endpoint, just like a puzzle.

Because MOTH will accept answers for questions that have not yet been "unlocked", and because the puzzles list does not consider the list of answers, a "tokens-only" mothball can be created that consists solely of answers.txt, and it will work the same as tokens.

Clone this wiki locally