第六关地址

http://www.pythonchallenge.com/pc/def/channel.html

和前几关一样,首先看网页源码吧。反正不看也没办法。。。

 <html><!-- <-- zip --><head>
<title>now there are pairs</title>
<link rel="stylesheet" type="text/css" href="../style.css">
</head>
<body>
<center>
<img src="channel.jpg">
<br>
<!-- The following has nothing to do with the riddle itself. I just
thought it would be the right point to offer you to donate to the
Python Challenge project. Any amount will be greatly appreciated. -thesamet
--> <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="thesamet@gmail.com">
<input type="hidden" name="item_name" value="Python Challenge donations">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="tax" value="0">
<input type="hidden" name="bn" value="PP-DonationsBF">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but04.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form> </center></body></html>

有用的信息 zip。<!--内容-->翻译是。     以下与谜题本身无关。。。

所以有用的只有一个zip。一开始以为zip是一个网页,后来发现是把

http://www.pythonchallenge.com/pc/def/channel.html

变换成

http://www.pythonchallenge.com/pc/def/channel.zip

得到一个zip压缩文件。

使用python代码解压。(压缩包解压也可以)

 #-*- coding:utf-8 -*-
#代码版本均为python 3.5.1
#Level 6 import zipfile
import os
import glob file = zipfile.ZipFile("channel.zip", "r") print ('''列出文件''')
for name in file.namelist():
print(name) print ('''列出文件信息''')
for info in file.infolist():
print (info.filename,"文件名")
print (info.date_time,"修改时间")
print (info.file_size,"大小")
print (info.compress_type,"压缩级别")
print (info.compress_size ,"压缩数据大小")
print (info.file_size,"未压缩文件大小") for i in range(1, 10):
print ("") print ('''解压操作 unzip''')
for name in file.namelist():
file.extract(name,os.getcwd()+"/zipfile_module") #解压到当前目录 #关闭压缩文件句柄
file.close

和之前的一关有点相似。跑了一遍代码。发现提示说答案在压缩文件注释中。

关于python压缩文件.

http://www.jb51.net/article/68417.htm

最终代码

#-*- coding:utf-8 -*-
#代码版本均为python 3.5.1
#Level 6 import zipfile
import os
import glob
import re file = zipfile.ZipFile("channel.zip", "r") p = 90052 for name in file.namelist():
line = str(file.read("%s.txt" % p))
m = re.search('Next nothing is ([0-9]+)', line)
print (file.getinfo("%s.txt" % p).comment.decode("utf-8"), end=" ")
p = m.group(1)

下一关地址。

http://www.pythonchallenge.com/pc/def/oxygen.html

pythonchallenge 解谜 Level 6的更多相关文章

  1. pythonchallenge 解谜 Level 0

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

  2. pythonchallenge 解谜 Level 8

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

  3. pythonchallenge 解谜 Level 7

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

  4. pythonchallenge 解谜 Level 5

    第五关的确很坑爹... 不过,根据之前的思路,我想着是把信息放在了 “源码” 中. 翻了下源码.有用的东西在以下部分. <html><head> <title>pe ...

  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. Android RadioGroup和RadioButton详解

    实现RadioButton由两部分组成,也就是RadioButton和RadioGroup配合使用.RadioGroup是单选组合框,可以容纳多个RadioButton的容器.在没有RadioGrou ...

  2. 简单的SQL语句

    说明:SQL语句大小写都可以,执行一句时,后面可不加分号,如果同时执行两句,就必须加分号,不然会报错. --+空格  是SQL的注释 表格名为users,里面有name和age属性 一.增 inser ...

  3. check time period

    /**     * @author etao     * @description check last time selected     * @param timePeriod     * @pa ...

  4. 深入HashMap

    HashMap: 内部基于数组和单向链表 重要的变量有: Entry<K,V>[] table = (Entry<K,V>[]) EMPTY_TABLE:结点数组table中存 ...

  5. 处理Https 异常记录 javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure

    http://blog.csdn.net/baidu_18607183/article/details/51595330 https://blogs.oracle.com/java-platform- ...

  6. Restful API

    http://www.ruanyifeng.com/blog/2011/09/restful 参考资料:-------以网络为基础的应用软件的架构设计. Restful API的设计与实践 字数218 ...

  7. html常用标签介绍

    常用标签介绍 文本 最常用的标签可能是<font>了,它用于改变字体,字号,文字颜色. 点击查看效果 <font size="6">6</font&g ...

  8. 海外建VPS并支持VPN

    推荐 DigitalOcean http://www.digitalocean.com/?refcode=7c26aea99ed6

  9. Codeigniter基础

    一.去除index.php 新建.htaccess: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUES ...

  10. Normalization

    In creating a database, normalization is the process of organizing it into tables in such a way that ...