pythonchallenge 解谜 Level 5
第五关的确很坑爹。。。
不过,根据之前的思路,我想着是把信息放在了 “源码” 中。
翻了下源码。有用的东西在以下部分。
<html><head>
<title>peak hell</title>
<link rel="stylesheet" type="text/css" href="../style.css">
<script async="" src="http://c.cnzz.com/core.php"></script></head>
<body>
<center>
<img src="peakhell.jpg">
<br><font color="#c0c0ff">
pronounce it
<br>
<peakhell src="banner.p">
<!-- peak hell sounds familiar ? -->
</peakhell></font></center></body></html>
出现了一个 src = "banner.p" 应该是一个有用的文件,替换下 url 下载,打开后发现
(lp0
(lp1
(S' '
p2
I95
tp3
aa(lp4
...
下一个信息 peak hell sounds familiar ? pick? 于是手动百度过发现有 pickle 这个模块。
替换下 url 发现下一个页面是 yes! pickle! 说明我们的方向是对的。
关于 pickle 模板 的使用。下面豆瓣这个介绍还是值得看一下的。
https://www.douban.com/note/143585267/
想着我们得到的文件应该是需要把文件进行重构对象。
重构先。
#-*- coding:utf-8 -*-
#代码版本均为python 3.5.1
#Level 5 import pickle pkl_file = open('banner.p', 'rb') data = pickle.load(pkl_file) print (data)
得到的是
[[(' ', 95)], [(' ', 14), ('#', 5), (' ', 70), ('#', 5), (' ', 1)], [(' ', 15), ('#', 4), (' ', 71), ('#', 4), (' ', 1)], [(' ', 15), ('#', 4), (' ', 71), ('#', 4), (' ', 1)], [(' ', 15), ('#', 4), (' ', 71), ('#', 4), (' ', 1)], [(' ', 15), ('#', 4), (' ', 71), ('#', 4), (' ', 1)], [(' ', 15), ('#', 4), (' ', 71), ('#', 4), (' ', 1)], [(' ', 15), ('#', 4), (' ', 71), ('#', 4), (' ', 1)], [(' ', 15), ('#', 4), (' ', 71), ('#', 4), (' ', 1)], [(' ', 6), ('#', 3), (' ', 6), ('#', 4), (' ', 3), ('#', 3), (' ', 9), ('#', 3), (' ', 7), ('#', 5), (' ', 3), ('#', 3), (' ', 4), ('#', 5), (' ', 3), ('#', 3), (' ', 10), ('#', 3), (' ', 7), ('#', 4), (' ', 1)], [(' ', 3), ('#', 3), (' ', 3), ('#', 2), (' ', 4), ('#', 4), (' ', 1), ('#', 7), (' ', 5), ('#', 2), (' ', 2), ('#', 3), (' ', 6), ('#', 4), (' ', 1), ('#', 7), (' ', 3), ('#', 4), ...
接下来把这些输出进行处理。代码如下
#-*- coding:utf-8 -*-
#代码版本均为python 3.5.1
#Level 5 import pickle pkl_file = open('banner.p', 'rb') data = pickle.load(pkl_file) print (data) print ('\n'.join([''.join([p[0] * p[1] for p in row]) for row in data]))
然后,进入下一关。
##### #####
#### ####
#### ####
#### ####
#### ####
#### ####
#### ####
#### ####
### #### ### ### ##### ### ##### ### ### ####
### ## #### ####### ## ### #### ####### #### ####### ### ### ####
### ### ##### #### ### #### ##### #### ##### #### ### ### ####
### #### #### ### ### #### #### #### #### ### #### ####
### #### #### ### #### #### #### #### ### ### ####
#### #### #### ## ### #### #### #### #### #### ### ####
#### #### #### ########## #### #### #### #### ############## ####
#### #### #### ### #### #### #### #### #### #### ####
#### #### #### #### ### #### #### #### #### #### ####
### #### #### #### ### #### #### #### #### ### ####
### ## #### #### ### #### #### #### #### #### ### ## ####
### ## #### #### ########### #### #### #### #### ### ## ####
### ###### ##### ## #### ###### ########### ##### ### ######
http://www.pythonchallenge.com/pc/def/channel.html
pythonchallenge 解谜 Level 5的更多相关文章
- 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 4
下一关... 一张图片,于是就点击了一下. 跳转到了 http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=12345 显示的是: ...
- 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/ 接下来会写破解教程~
随机推荐
- ios app内嵌入http服务器
1.采用CocoaHTTPServer https://github.com/robbiehanson/CocoaHTTPServer 2.采用MongooseDaemon https://githu ...
- jquery mobile
页面:data-role="page" header.content.fooder 过渡:data-transition ="slide" 反向过渡:dat ...
- java 多态和内部类
接口跟接口之间存在继承关系 一个接口可以继承多个接口 一个非抽象类:必须实现接口中的所有方法 一个抽象类实现接口 可以不实现接口中的方法 但是继承与抽象类的类必须要是实现接口中的方法 多态:一个对 ...
- 51node1264(判断线段相交)
题目链接:https://www.51nod.com/onlineJudge/questionCode.html#!problemId=1264 题意:中文题诶- 思路:对于直线a1a2, b1b2, ...
- FragmentPagerAdapter加载fragment并使用setUserVisibleHint()处理预加载时遇到的坑,给textview赋值时出现的空指针异常
FragmentPagerAdapter加载fragment并使用setUserVisibleHint()处理预加载时,给textview赋值时出现的空指针异常 public class BaseFr ...
- MarkdownPad2 表格不显示处理
1.添加表格的扩展 工具 >选项 > Markdown >Markdown处理器 改为 “Markdown(扩展)”即可. 2.在设置的过程中要注册markdownpad2 邮箱: ...
- 修改WAMP中mysql默认空密码
WAMP安装好后,mysql密码是为空的,那么要如何修改呢?其实很简单,通过几条指令就行了,下面我就一步步来操作. 首先,通过WAMP打开mysql控制台. 提示输入密码,因为现在是空,所以直接按回车 ...
- facebook 简单的图文分享
参考网址:http://www.mrfangge.com/facebook-page-share-settings/ 首先在facebook 注册开发者,新增一个应用,这里就要一个生所的应用 app_ ...
- Memo
1.Webpack: node_modules/css/index.js didn't return a function npm install css-loader style-loader ...
- Linux学习笔记(8)-exec族函数
昨天学习了Linux下的进程创建,创建一个进程的方法极为简单,只需要调用fork函数就可以创建出一个进程,但是-- 介绍fork()函数的时候提到,在创建进程后,子进程与父进程有相同的代码空间,执行的 ...