Quantcast
Channel: Charles的技术博客 » pythonchallenge
Viewing all articles
Browse latest Browse all 7

python challenge level 7

$
0
0

继续写python challenge,现在是level 7

题目链接

http://www.pythonchallenge.com/pc/def/oxygen.html

思路

题目页面有一张图片,图片有点奇怪的地方是中间有部分是马赛克

再看页面源码,没有什么有效信息

那么只能从这个图片的马赛克部分获取信息了

#!/usr/bin/env python3

import Image

if __name == '__main__':
    img = Image.open('oxygen.png')

    box = (0, 43, 608, 52)
    belt = img.crop(box)
    pixels = belt.convert('L').getdata()

    str = []
    for i in range(0, 608, 7):
        str.append(chr(pixels[i]))

    print(''.join(str))

由于没有image库,所以结果直接从网上拿来的

输出integrity

http://www.pythonchallenge.com/pc/def/integrity.html 为level 8的页面


Viewing all articles
Browse latest Browse all 7

Latest Images

Trending Articles





Latest Images