http://www.pythonchallenge.com/pc/def/integrity.html
打开后图片是一只勤劳的小蜜蜂, 标题“working hard”, 源代码:
<html>
<head>
<title>working hard?</title>
<link rel="stylesheet" type="text/css" href="../style.css">
</head>
<body>
<br><br>
<center>
[外链图片转存失败(img-DcrmVlE6-1562120064342)(https://mp.youkuaiyun.com/integrity.jpg)]
<map name="notinsect">
<area shape="poly"
coords="179,284,214,311,255,320,281,226,319,224,363,309,339,222,371,225,411,229,404,242,415,252,428,233,428,214,394,207,383,205,390,195,423,192,439,193,442,209,440,215,450,221,457,226,469,202,475,187,494,188,494,169,498,147,491,121,477,136,481,96,471,94,458,98,444,91,420,87,405,92,391,88,376,82,350,79,330,82,314,85,305,90,299,96,290,103,276,110,262,114,225,123,212,125,185,133,138,144,118,160,97,168,87,176,110,180,145,176,153,176,150,182,137,190,126,194,121,198,126,203,151,205,160,195,168,217,169,234,170,260,174,282"
href="../return/good.html" />
</map>
<br><br>
<font color="#303030" size="+2">Where is the missing link?</font>
</body>
</html>
<!--
un: 'BZh91AY&SYA\xaf\x82\r\x00\x00\x01\x01\x80\x02\xc0\x02\x00 \x00!\x9ah3M\x07<]\xc9\x14\xe1BA\x06\xbe\x084'
pw: 'BZh91AY&SY\x94$|\x0e\x00\x00\x00\x81\x00\x03$ \x00!\x9ah3M\x13<]\xc9\x14\xe1BBP\x91\xf08'
-->
可疑的几处是一、 /return/good.html点开后是个链接,需要账户密码; 二、coords 后一长串,不知道是啥, 三、最后一个注释,有un 跟 pw字样,明摆着是account and password ,因此尝试先从此入手。这是一个典型的bz2压缩后的字符,用bz2 反压缩看看
import bz2
un= b'BZh91AY&SYA\xaf\x82\r\x00\x00\x01\x01\x80\x02\xc0\x02\x00 \x00!\x9ah3M\x07<]\xc9\x14\xe1BA\x06\xbe\x084'
pw= b'BZh91AY&SY\x94$|\x0e\x00\x00\x00\x81\x00\x03$ \x00!\x9ah3M\x13<]\xc9\x14\xe1BBP\x91\xf08'
print(bz2.decompress(un))
print(bz2.decompress(pw))
输出:
b’huge’
b’file’
将 huge file 输入之前的框框,得到个新的页面:
http://www.pythonchallenge.com/pc/return/good.html
标题是 ‘’connect the dots‘ 连点,图片中的黑点连起来看看
也没看出来是啥东西,囧,再看看源代码,太长不输了,里面有个first second, 要求first+second。目前到此,无头绪了。
3天无灵感了,今天早上坐地铁,又翻了翻这个帖子,忽然想到是不是就是关键在connect the dots? 因为不可能让大家手动去连,所以,要连的估计是first 与 second, 目前只会用matplotlib 画图,于是把 first 与 second 按顺序分成x,y, 然后试试:
from matplotlib import pyplot as plt
def list_rerrange(ls):
dev_x = []
dev_y = []
for i in range(len(ls)):
if i%2 == 0:
dev_x.append(ls[i])
else:
dev_y.append(s[i])
plt.scatter(dev_x, dev_y)
plt.show()
first = [146,399,...,399]
second = [156,141,...,136]
list_rerrange(first + second)
画出来一个倒着的牛,改改y值把牛正过来看看:
from matplotlib import pyplot as plt
def list_rerrange(ls):
dev_x = []
dev_y = []
for i in range(len(ls)):
if i%2 == 0:
dev_x.append(ls[i])
else:
dev_y.append(0-ls[i])
plt.scatter(dev_x, dev_y)
plt.show()
first = [146,399,...,399]
second = [156,141,...,136]
list_rerrange(first + second)
好啦,这么完美的图像肯定是答案了,牛:cow, cattle, ox, bull, beef.试试看看。 cow时提示是个母牛,输入ox,没有, 输入bull 。通关!!!
美中不足的是只会用matplotlib画图,还有待进一步加强!