pythonchallenge_level8

简介: pythonchallenge各关解题

level8

地址:http://www.pythonchallenge.com/pc/def/integrity.html
源码:git@code.aliyun.com:qianlizhixing12/PythonChallenge.git。
问题:使用bz2对象观察打印。

#!/usr/bin/env python3
# -*- coding:UTF-8 -*-

# Level 8

import urllib.request

url = "http://www.pythonchallenge.com/pc/def/integrity.html" 
response = urllib.request.urlopen(url)
body = response.read().decode("utf8")
response.close

import re

stim = re.findall("<!--\nun: '(.+)'\npw: '(.+)'\n-->", body)
user, password = stim[0][0], stim[0][1]
print("Level 8:", user, password, sep = "\n")

import bz2

user, password = b"BZh91AY&SYA\xaf\x82\r\x00\x00\x01\x01\x80\x02\xc0\x02\x00 \x00!\x9ah3M\x07<]\xc9\x14\xe1BA\x06\xbe\x084", b"BZh91AY&SY\x94$|\x0e\x00\x00\x00\x81\x00\x03$ \x00!\x9ah3M\x13<]\xc9\x14\xe1BBP\x91\xf08"
user, password = bz2.decompress(user), bz2.decompress(password) 
print("Level 8:", user, password, sep = "\n")
相关文章
|
5月前
[WUSTCTF 2020]level3
[WUSTCTF 2020]level3
36 0
|
7月前
|
Java
【ERROR】‘<>‘ operator is not allowed for source level below 1.7
【ERROR】‘<>‘ operator is not allowed for source level below 1.7
82 0
|
编译器 Linux Windows
[√]_ITERATOR_DEBUG_LEVEL
[√]_ITERATOR_DEBUG_LEVEL
118 0
|
Python
pythonchallenge_level7
pythonchallenge各关解题
1160 0
|
Python
pythonchallenge_level4
pythonchallenge各关解题
1118 0
pythonchallenge_level13
pythonchallenge各关解题
1107 0