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/ 接下来会写破解教程~
随机推荐
- tp5 model 中的类型转换
类型转换使用 $type 定义 // 保存到数据库的数据会自动转换为相对应的格式class User extends Model { protected $type = [ 'status' => ...
- ASP.NET中的chart控件绑定SQL Server数据库
网上很多的chart控件的实例都没有绑定数据库,经过一番摸索后,终于实现了chart控件绑定数据库. 首先,在Visual Studio中建立一个网站,新建一个WebForm项目,名称为ChartTe ...
- php学习中——知识点(1)
php是嵌入式脚本语言(意义也就不言而喻) 标识:<?php .... ?> 输出:echo "**"; 使用美元符号($)后跟变量名表示变量,区分大 ...
- jquery动态合并表格行
利用<td rowspan = "num"/>;原理来实现,其中num为要合并的行数. <!DOCTYPE html> <html> <h ...
- 用flex做垂直居中
<div class="flex-cont flex-centerbox"> <div class="center-cont"> < ...
- php 封装 知识点
类由众多对象抽象出来的对象由类实例化出来的 成员变量成员方法成员属性 访问修饰符public 公有的protected 受保护的private 私有的 构造函数1.写法特殊2.执行时间特殊 面向对象的 ...
- python之路:Day03 --- Python基础3 >>函数
本节内容 1.函数基本语法及特性 2.参数 3.局部变量与全局变量 4.返回值 嵌套函数 5.递归 6.匿名函数 7.高阶函数 8.内置函数 一.函数基本语法及特性 区别 面向过程编程:根据业务逻辑从 ...
- 当攻击者熟读兵法,Camouflage病毒实战演示暗度陈仓之计
"明修栈道,暗度陈仓"的典故许多人都听说过,该典故出自楚汉争霸时期,刘邦意图进入关中,需要攻下关中咽喉之地--陈仓.韩信献出一计:表面上浩浩荡荡地修复通往陈仓的栈道以迷惑陈仓守将, ...
- Office文档在线预览
工具说明:通过传入文档的Web地址,即可进行Office文档的在线预览. 使用方式: 在http://office.qingshanboke.com地址后,通过url参数传入您想预览的文件路径. 如: ...
- MSSQL2005后版本插入数据返回ID的新写法
例子: INSERT VolunteerSound_Table (Title,ArticleContent)OUTPUT Inserted.ID VALUES ('FirstVal','bbbbb') ...