PythonChallenge 挑战之路 Level-7
来源:互联网 发布:mac 文件共享 灰色 编辑:程序博客网 时间:2024/05/21 23:33
这一关的图片的中间明显有问题,而除此之外之后没有任何提示,查看网页源码也没有任何下载链接。看来应该是处理这副图片的中间那一条线的数据了。
查了一下Python关于图片处理的模块,找到一个PIL(Python Image Library),需要自己手动下载、安装一下。
弄好后,读取中间的像素点的信息,发现像素的R G B都相等(上网查了一下,只要R=G=B,那么就是灰色的,正如图片上显示的那样),转化为字符,有效信息为:
smart guy, you made it. the next level is [105, 110, 116, 101, 103, 114, 105, 116, 121]
继续将给出的List再转化为字符,结果为:
integrity
替换网址,顺利过关:)
程序为:
import Imageim = Image.open('oxygen.png')print ''.join([chr(i[0]) for i in [im.getpixel((j,im.size[1]/2)) for j in range(0,im.size[0],7)]])key = [105, 110, 116, 101, 103, 114, 105, 116, 121]print ''.join(chr(i) for i in key)
- PythonChallenge 挑战之路 Level-7
- PythonChallenge 挑战之路 Level-0
- PythonChallenge 挑战之路 Level-1
- PythonChallenge 挑战之路 Level-2
- PythonChallenge 挑战之路 Level-3
- PythonChallenge 挑战之路 Level-4
- PythonChallenge 挑战之路 Level-5
- PythonChallenge 挑战之路 Level-6
- 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
- PythonChallenge 挑战之路 Level-17
- 学生信息管理系统解析之界面实践篇
- uva 591
- 小学生玩ACM----栈和队列
- Poj 1743 Musical Theme (后缀数组 不可重叠最长重复子串)
- rc : Blue Screen Data
- PythonChallenge 挑战之路 Level-7
- 产品经理(PM)常用原型图设计工具 Axure RP 等等
- postgresl问题探讨1
- 前端开发学习之道:jQuery 1.7.1API手册
- hdu4341(分组背包)
- poj 2195 Going Home(KM||费用流)
- 3.4. 事务
- Apache Avro 与 Thrift 比较
- PostGreSQL“快照”