No. 0 Pass
Http://www.pythonchallenge.com/pc/def/0.html
>>>print 2 * * 38274877906944L
The replacement URL is http://www.pythonchallenge.com/pc/def/274877906944.html
1th Pass
Http://www.pythonchallenge.com/pc/def/map.html
is a password, the letter moves backwards two bits, YZ becomes AB
#! /usr/bin/env python# coding: utf-8# author: toddlerya# date: 2015-1-27alpha = [' A ', ' B ', ' C ', ' d ', ' e ', ' f ', ' g ', ' h ', ' I ', ' J ', ' K ', ' l ', ' m ', ' n ', ' o ', ' P ', ' q ', ' R ', ' s ', ' t ', ' u ', ' V ', ' W ', ' x ', ' y ', ' z ']goal = "" "g fmnc wms bgblr rpylqjyrc gr zw fylb.rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylbgq glcddgagclr ylb Rfyr ' Q&NBSP;UFW&NBSP;RFGQ&NBSP;RCVR&NBSP;GQ&NBSP;QM&NBSP;JMLE.SQGLE&NBSP;QRPGLE.KYICRPYLQ () gq PCAMKKCLBCB.&NBSP;LMU&NBSP;YNNJW&NBSP;ML&NBSP;RFC&NBSP;SPJ. "" " alpha_dict = {' A ': 0, ' C ': 2, ' B ': 1, ' e ': 4, ' d ': 3, ' G ': 6, ' F ': 5, ' i ': 8, ' h ': 7, ' K ': 10, ' J ': 9 , ' m ': 12, ' l ': 11, ' O ': 14, ' n ': 13, ' q ': 16, ' P ': 15, ' s ': 18, ' R ': 17, ' u ': 20, ' t ': 19, ' W ': 22, ' V ': 21, ' y ': 24, ' x ': 23, ' z ': 25}result_dict = {0: ' a ', 1: ' B ', 2: ' C ', 3: ' d ', 4: ' e ', 5: ' f ', 6: ' g ', 7: ' h ', 8: ' i ', 9: ' j ', 10: ' K ', 11: ' l ', 12: ' m ', 13: ' n ', 14: ' o ', 15: ' P ', 16: ' Q ', 17: ' R ', 18: ' s ', 19: ' t ', 20: ' u ', 21: ' V ', 22: ' W ', 23: ' x ', 24: ' y ', 25: ' z '} #alpha_dict = dict ([ (alpha[i], i) for i in range (0,26)] ) #result_dict = Dict ([ (I, alpha[i]) for i in range (0,26)] ) result_order = [] result = []for a in goal: if a in alpha: i = alpha_dict[a] if i < 24: j = i + 2 Result_order.append (j) elif 24 == i: j = 0 result_order.append (j) elif 25 == i: j = 1 result_order.append (j) #print result_orderfor r in result_order: x = result_dict[r] result.append (x) #print resultnum = 0for a in goal: if a in alpha_dict: print result[num], num += 1 else: &Nbsp; print a,
Clearance Password:
I h o p e y o u d i d n T t r a n s l a T e i t b y h a n d.
t h a t s W h a t c o m P u t e R S a r E F o r. D o i n g i t i n b y h a n d
i s i n E F f i c I e n t a n d t h a T ' s W H y t h i s t e x t i s s o l o n G.
U S i n g s t r i n G. M a K e T r a n s () I s r e c o m m e n d e D. N o w a p p l y o n t h e u r L.
Follow the instructions to change the next, good concise ... I made the wheel and wrote it so ugly ...
#! /usr/bin/env python# coding:utf-8# author:toddlerya# date:2015-1-27from string Import maketransin_string = "Abcdefghijk lmnopqrstuvwxyz "out_string =" Cdefghijklmnopqrstuvwxyzab "goal =" "G FMNC wms Bgblr RPYLQJYRC gr ZW fylb.rfyrq Ufyr AMKNSR CPQ ypc DMP. Bmgle GR GL ZW fylbgq glcddgagclr ylb rfyr ' q UFW rfgq rcvr GQ QM Jmle.sqgle QRPGLE.KYICRPYLQ () GQ PCAMKKCLBCB. LMU ynnjw ml RFC spj. "" " trans_string = Maketrans (in_string, out_string) print goal.translate (trans_string)
This side of the output is much more beautiful:
I hope you didnt translate it by hand.
Thats what computers is for. Doing it in by hand
is inefficient and that's why the this text was so long.
Using String.maketrans () is recommended. Now apply to the URL.
2nd Pass
Http://www.pythonchallenge.com/pc/def/ocr.html
From the tips to know, view the source code, find a comment
<!--
Find rare characters in the mess below:
-
<!--
%%[email protected]_$^__#) ^) &!_+]!*@&^}@[@%] ()%+$&[([email protected]%+%$*^@$^!+]!&_#) _*}{}}!} _]$[%}@[{[email protected] #_ ^{*
@##&{#&{&) *% (]{{([*}@[@&]+
......
-
#!/usr/bin/env python# coding:utf-8# author:toddlerya# date:2015-1-27# put the contents of the note into the Rare_char Rare_char = "" "%%[email protected]_$^__#) ^) &!_+]!*@&^}@[@%] ()% omitted n line "" "TMP = []for i in Rare_char:if i in Tmp:pass else: Tmp.append (i) Print I, Rare_char.count (i)
The results of the operation are as follows:
[Email protected]:~/desktop$ python 3.py 1220% 6104$ 6046@ 6157_ 6112^ 6030# 6115] 6186& 6043! 6079+ 6066] 6152* 6034} 6105[6108 (6154{6046e 1q 1u 1a 1l 1i 1t 1y 1
You can see that the fewest characters are equality. This is the clearance code. Change the URL, the next pass
3rd Pass
Http://www.pythonchallenge.com/pc/def/equality.html
Python Challenge Fun Challenge