March 4, 2012

Python Challenge Hints

Level 0
Trying to change the URL to 1.html shows a hint. The picture says 2 on the power of 38... Which is larger than 1, of course. But it also says how you can compute the number with Python.

Paste the result into the URL between the last '/' and the '.html'. (This is the way to solve all the levels!)

Level 1
The principle behind this puzzle is relatively easy to guess if you have learned some basic cryptography and cryptanalysis on an information security course.

If not, then this article might be helpful...

The message in purple is encoded in Caesar's cypher. You can try to decrypt it with a pen and paper, but since the point of this whole website is to practice programming, and the later levels will be absolutely impossible to solve this way, you'd better try to write some piece of code to do the trick.

In the end, you have to transpose the letters 'm', 'a' and 'p' in the URL the same way. For that matter, this can be done even without pen or paper...

Level 2
This one is much more tricky already.
  • Check out the source code of the page. After the HTML code, you will find a very long text of random characters. They are mostly signs like #\%*$...
  • The advice tells you to find rare characters in the long text. 
  • Hint: the characters are all ASCII!
  • Solution: find out for all the characters in the ASCII table how frequently they appear in the text. Each ASCII character has a numeric value between 0 and 256 which can be found out with a function in most programming languages. In Python, this function is called ord(). Its inverse is called chr().
  • You have to find 8 characters. If you found them, you have to put them in the order in which they appear in the text. After finding the letters, write a program that examines each character in the text: if it is one of these eight, it has to append it to a result string.
  • This result string is going to be an English word.
Level 3
The hint under the picture is not very trivial to understand. If you are smart, you might find out the correct interpretation on the forums...

The correct interpretation:
  • One small letter surrounded by three "big bodyguards", i.e. capital letters.
  • So we have to find strings of three capital letters followed by a small letter and three more capital letters. That's easy!
  • You will find 516 results. Now what? The solution is obviously not 516 letters long...
  • But hey! The word 'exactly' is put in bold caps with a reason. What does it mean? It means no more and no less then three characters on both sides.
  • It means you have to examine 4 characters around each small letter you find! So we are looking for strings of 9 characters, not 7! The first is not a capital letter (so it's a small letter or a sign), the following three are caps, the fifth is a small letter, then three caps again, and finally one more non-cap.
  • You will have 10 such strings. If you put their small letters after one another, you will see the solution...
A very elegant and concise solution can be found here...

No comments: