Linkedlist"/>
PythonChanllenge第四关:Linkedlist
.php
源代码中的提示:
<a href="linkedlist.php?nothing=12345"><img src="chainsaw.jpg" border="0"/></a>
脚本:
import urllib.request
import renextno = 12345for i in range(500):page = urllib.request.urlopen(".php?nothing=%s" % (nextno))text = page.read().decode("utf-8")nextno = re.search('and the next nothing is (\d+)', text)if nextno:nextno = nextno.groups()[0]print(nextno+'\n')else:print(text)break
中间提示:“Yes. Divide by two and keep going.”,将nextno修改继续执行即可。
更多推荐
PythonChanllenge第四关:Linkedlist
发布评论