PythonChallenge 挑战之路 Level-29
来源:互联网 发布:matlab 如何遍历数组 编辑:程序博客网 时间:2024/05/01 16:44
这一关的标题是silence,然后就没啥提示了,但是查看源码的时候可以发现有很多多余的空白行,信息应该是隐藏在这里面,读取页面后发现那些空白行中的空格个数都不一样,而这些数目刚好可以形成以BZh开头的一段文本,再用bz2解码就可以看到结果了。代码:
import urllib,bz2f = urllib.urlopen('http://repeat:switch@www.pythonchallenge.com/pc/ring/guido.html')s= [chr(len(i)-1) for i in f.readlines()[12::]]text = ''.join(s)print bz2.decompress(text)结果为:
Isn't it clear? I am yankeedoodle!
所以谜底就是yankeedoodle
- PythonChallenge 挑战之路 Level-29
- PythonChallenge 挑战之路 Level-0
- PythonChallenge 挑战之路 Level-1
- PythonChallenge 挑战之路 Level-2
- PythonChallenge 挑战之路 Level-3
- PythonChallenge 挑战之路 Level-4
- PythonChallenge 挑战之路 Level-5
- PythonChallenge 挑战之路 Level-6
- PythonChallenge 挑战之路 Level-7
- PythonChallenge 挑战之路 Level-8
- PythonChallenge 挑战之路 Level-9
- PythonChallenge 挑战之路 Level-10
- PythonChallenge 挑战之路 Level-11
- PythonChallenge 挑战之路 Level-12
- PythonChallenge 挑战之路 Level-13
- PythonChallenge 挑战之路 Level-14
- PythonChallenge 挑战之路 Level-15
- PythonChallenge 挑战之路 Level-16
- 实验4 [bx]和loop的使用——第二小题
- 常用的字符串加密和解密
- malloc与calloc
- JVM字节码初探--字节码
- adb介绍
- PythonChallenge 挑战之路 Level-29
- 三种基础的博弈知识和自己的小总结
- hdu2955 Robberies (01背包)
- 字符串移位问题
- Storm源码阅读(三):Thrift
- 树控件
- Objective-C,ios,属性声明(property declarations), 自定义属性,自动生成 get 和 set 方法,getter 和 setter
- poj 1882完全背包变形
- 安卓api之高德地图API(申请高德地图apiv2)