第五关的确很坑爹。。。

不过,根据之前的思路,我想着是把信息放在了 “源码” 中。

翻了下源码。有用的东西在以下部分。

<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的更多相关文章

  1. pythonchallenge 解谜 Level 0

    解谜地址: http://www.pythonchallenge.com/pc/def/0.html 这题没什么难度,意思就是得到2的38次方的值,然后,替换 http://www.pythoncha ...

  2. pythonchallenge 解谜 Level 6

    第六关地址 http://www.pythonchallenge.com/pc/def/channel.html 和前几关一样,首先看网页源码吧.反正不看也没办法... <html>< ...

  3. pythonchallenge 解谜 Level 8

    #-*- coding:utf-8 -*- #代码版本均为python 3.5.1 #Level 7 import bz2 un=b'BZh91AY&SYA\xaf\x82\r\x00\x00 ...

  4. pythonchallenge 解谜 Level 7

    #-*- coding:utf-8 -*- #代码版本均为python 3.5.1 #Level 7 from PIL import Image x_begin, x_end = 0, 609 y_b ...

  5. pythonchallenge 解谜 Level 4

    下一关... 一张图片,于是就点击了一下. 跳转到了 http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=12345 显示的是: ...

  6. pythonchallenge 解谜 Level 3

    第三关. 问题的解法在于正则表达式. 首先...你应该能找到需要正则的字符在哪里...那就好了! 题意就是说: One small letter, surrounded by EXACTLY thre ...

  7. pythonchallenge 解谜 Level 2

    好吧,赶紧贴一下. #-*- coding:utf-8 -*- #代码版本均为python 3.5.1 #Level 2 import re file = open("Level 2.txt ...

  8. pythonchallenge 解谜 Level 1

    得到第一关地址后可以进行第一关的解析了. 看起来好神秘的样子.但是也就是把字母 k 变成 m , o 变成 q ,e 变成 g.将字母对应的ASCII的值+2就行了. #-*- coding:utf- ...

  9. pythonchallenge 解谜

    所有代码均使用python 3.5.1 版本 最近在学python,闲来无事觉得这个解谜还挺有意思. 解谜网址  http://www.pythonchallenge.com/ 接下来会写破解教程~

随机推荐

  1. Java基础高级一(正则表达式)

    1.正则语法:元字符,量词,范围,组,属性 2.String类常用正则方法split,indexOf,replaceAll 3.Java正则类Pattern,Match而的使用 1.String常用方 ...

  2. iOS 修改状态栏preferredStatusBarStyle不执行问题

    一.在老版本的iOS中,状态栏永远都是白色风格.而在iOS 7中,我们可以修改每个view controller中状态栏的外观.通过UIStatusBarStyle常量可以指定状态栏的内容是暗色或亮色 ...

  3. 解决Eclipse Failed to write core dump. Minidumps are not enabled by default on client versions

    -XX:+CreateMinidumpOnCrash 如果还有问题,就只能看日志了 T_T

  4. JS判断有无网络(移动端)

    ar EventUtil = { addHandler: function (element, type, handler) { if (element.addEventListener) { ele ...

  5. C#递归、动态规划计算斐波那契数列

    //递归         public static long recurFib(int num)         {             if (num < 2)              ...

  6. 高性能缓存系统Redis安装与使用

    在互联网后台架构中,需要应付高并发访问数据库,很多时候都会在数据库上层增加一个缓存服务器来保存经常读写的数据以减少数据库压力,可以使用LVS.Memcached或Redis,Memcached和Red ...

  7. HTML入门教程 这里可以免费学习啦

    本文目标 30分钟内让你明白HTML是什么,并对它有一些基本的了解.一旦入门后,你可以从网上找到更多更详细的资料来继续学习. 什么是HTML HTML是英文Hyper Text Mark-up Lan ...

  8. 先定一个小目标,自己封装个ajax

    你是否发现项目中有很多页面只用到了框架不到十分之一的内容,还引了压缩后还有70多kb的jquery库 你是否发现项目中就用了两三个underscore提供的方法,其他大部分的你方法你甚至从来没有看过 ...

  9. .NET 程序集Assembly使用

    概述 一直以来,我们都在用C#编写程序,编写程序的时候,我们用到继承.多态.接口以及泛型,我们也都明白子类可以继承抽象类,并能够重写父类的抽象方法,可是大家是否想过,如下几个问题: 1.凡树必有根和叶 ...

  10. jQuery对象与dom对象相互转换

    核心提示:jquery选择器得到的jquery对象和标准的 javascript中的document.getElementById()取得的dom对象是两种不同的对象类型,一般情况下,如S('#id' ...