pythonchallenge Level 29
第29关地址:http://www.pythonchallenge.com/pc/ring/guido.html
用户名 repeat 密码 switch
查看源码
标题:silence!
图片名称:whoisit.jpg
import base64 import bz2 import requests url = "http://www.pythonchallenge.com/pc/ring/guido.html" Authorization = format(base64.b64encode(b'repeat:switch').decode()) headers = {'Authorization': 'Basic %s' % Authorization} response = requests.request("GET", url, headers=headers) # print(response.text) # 发现下面有很多空行 blank = response.text.splitlines()[12:] lenblank = [len(b) for b in blank] # 计算每行空格个数 print(lenblank) text = bz2.decompress(bytes(lenblank)).decode() print(text) # Isn't it clear? I am yankeedoodle!
得到 Isn't it clear? I am yankeedoodle!
图片名称是 who is it 答案 yankeedoodle
获得下一关地址:http://www.pythonchallenge.com/pc/ring/yankeedoodle.html
本文来自博客园,作者:OTAKU_nicole,转载请注明原文链接:https://www.cnblogs.com/nicole-zhang/p/15569392.html