pythonchallenge 解谜 Level 4
下一关。。。
一张图片,于是就点击了一下。
跳转到了
http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=12345
显示的是:
and the next nothing is 44827
下一个。。。
and the next nothing is 45439
再来一个。。
Your hands are getting tired and the next nothing is 94485。。。
一直循环下去了。。。肯定是打开的方式不对。。
回到原网页,F12
<!-- urllib may help. DON'T TRY ALL NOTHINGS, since it will never
end. 400 times is more than enough. -->
额。回去上课,回来发代码。
这个有点坑爹。代码就直接发了。原理就是获取下一个链接的 nothing 然后用python 帮你自动进入下一个网页。大量循环。
#-*- coding:utf- -*-
#代码版本均为python 3.5.
#Level import urllib.request
import re def next_page(p):
text = urllib.request.urlopen('http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=%s' % p).read().decode('utf-8')
m = re.search('and the next nothing is ([0-9]+)', text)
if not m: print (text)
return m.group() p = for i in range(,):
print (" 第%s次运行" % i,end="")
p = next_page(p)
print (p)
所以可以得到第5关的链接。
http://www.pythonchallenge.com/pc/def/peak.html
目前对第5关一脸懵bi。。。
晚上解
pythonchallenge 解谜 Level 4的更多相关文章
- pythonchallenge 解谜 Level 0
解谜地址: http://www.pythonchallenge.com/pc/def/0.html 这题没什么难度,意思就是得到2的38次方的值,然后,替换 http://www.pythoncha ...
- pythonchallenge 解谜 Level 6
第六关地址 http://www.pythonchallenge.com/pc/def/channel.html 和前几关一样,首先看网页源码吧.反正不看也没办法... <html>< ...
- pythonchallenge 解谜 Level 8
#-*- coding:utf-8 -*- #代码版本均为python 3.5.1 #Level 7 import bz2 un=b'BZh91AY&SYA\xaf\x82\r\x00\x00 ...
- pythonchallenge 解谜 Level 7
#-*- coding:utf-8 -*- #代码版本均为python 3.5.1 #Level 7 from PIL import Image x_begin, x_end = 0, 609 y_b ...
- pythonchallenge 解谜 Level 5
第五关的确很坑爹... 不过,根据之前的思路,我想着是把信息放在了 “源码” 中. 翻了下源码.有用的东西在以下部分. <html><head> <title>pe ...
- pythonchallenge 解谜 Level 3
第三关. 问题的解法在于正则表达式. 首先...你应该能找到需要正则的字符在哪里...那就好了! 题意就是说: One small letter, surrounded by EXACTLY thre ...
- pythonchallenge 解谜 Level 2
好吧,赶紧贴一下. #-*- coding:utf-8 -*- #代码版本均为python 3.5.1 #Level 2 import re file = open("Level 2.txt ...
- pythonchallenge 解谜 Level 1
得到第一关地址后可以进行第一关的解析了. 看起来好神秘的样子.但是也就是把字母 k 变成 m , o 变成 q ,e 变成 g.将字母对应的ASCII的值+2就行了. #-*- coding:utf- ...
- pythonchallenge 解谜
所有代码均使用python 3.5.1 版本 最近在学python,闲来无事觉得这个解谜还挺有意思. 解谜网址 http://www.pythonchallenge.com/ 接下来会写破解教程~
随机推荐
- log4j使用总结
1.不同包的日志,记录到不同文件 log4j.logger.com.gyoung.service.impl=INFO,Doc log4j.appender.Doc=com.gyoung.logger. ...
- 利用html5、websocket和opencv实现人脸检测 (二)
前一篇的代码在执行时,java.exe占用内存会快速上涨: 在4G内存电脑上,单个连接,会持续上涨到2G多,然后减到1G多,如此循环. 经过一些删减定位,可以确定问题由public byte[] pr ...
- Python Virtualenv运行Django环境配置
系统: RHEL6.5 版本说明: Python-3.5.0 Django-1.10.4 virtualenv:为每个项目建立不同的/独立的Python环境,你将为每个项目安装所有需要的软件包到它们各 ...
- squid 2.7 通过域名反向代理多个服务器的配置方法
详细配置及注释如下,供大家学习参考. visible_hostname squid1.abc.com #设定squid的主机名,如无此项squid将无法启动 http_port 80 accel vh ...
- Hitachi Content Platform学习
相关资料:https://community.hds.com/groups/developer-network-for-hitachi-content-platform/content?filterI ...
- RabbitMQ的几种应用场景
RabbitMQ是一个消息代理,从“生产者”接收消息并传递消息至“消费者”,期间可根据规则路由.缓存.持久化消息.“生产者”也即message发送者以下简称P,相对应的“消费者”乃message接收者 ...
- [Javascript] 前端随笔
做一个小功能时使用到的一点技术点记录下来: 1.在js中使用定时器: 这两个方法都可以用来实现在一个固定时间段之后去执行JavaScript.不过两者各有各的应用场景. 方 法 实际上,setTime ...
- UWP Composition API - GroupListView(二)
还是先上效果图: 看完了上一篇UWP Composition API - GroupListView(一)的童鞋会问,这不是跟上一篇一样的吗??? 骗点击的?? No,No,其实相对上一个有更简单粗暴 ...
- nodejs持续学习--必须关注4网站
1.官网:https://nodejs.org/en/ 2.模块社区:www.npmjs.com(FQ) 3.github.com 4.全球技术问题讨论社区 http://stackoverflow. ...
- Spring的JDBC模板
Spring对持久层技术支持 JDBC : org.springframework.jdbc.core.JdbcTemplate Hibernate3.0 : org.springframework. ...