Wednesday, August 6, 2014

Python Challenge Level 5 Solution

Problem = http://www.pythonchallenge.com/pc/def/peak.html

CODE : https://github.com/dkuldeep11/python-challenge/tree/master/challenge-5

EXPLANATION ::

As you can see, nothing concrete hint here, all I could think of is to type "hill.html", but of course was useless :P

1) go to source code of the html page
2) there is a another image "banner.p" as mentioned below:
<peakhell src="banner.p"/>

3) click on the image, it will redirect you to the page, where scrambled data can be seen.
4) Using urllib module, download the page contents.
5) Intuitively the scrambled data seems to be serialized, let's try to deserialize it using pickle module
6) We do get meaningful data e.g. 












7) only 2 types of characters, " " and "#", and their relevant count, so just form the corresponding string i.e. (' ', 5), ('#', 3) => '     ###' i.e. 5 spaces 3 pounds

8) go on printing every line in that fashion, and we get the answer as:
















SOLUTION = channel











No comments:

Post a Comment