得到第一关地址后可以进行第一关的解析了。

看起来好神秘的样子。但是也就是把字母 k 变成 m , o 变成 q ,e 变成 g。将字母对应的ASCII的值+2就行了。

 #-*- coding:utf-8 -*-
#代码版本均为python 3.5.1
#Level 1
str = "g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj." def decode(i):
"""通过函数方法把i的值处理
注意在ASCII中小写字母的范围
使用函数ord() chr()
函数内容可以优化,我懒得动了。
"""
if ord(i)>=ord("a") and ord(i)+2<=ord("z"):
return chr(ord(i)+2)
elif i=="y" or i=="z":
return chr(ord(i)+1-ord("z")+ord("a"))
else :
return i for i in str:
print (decode(i),end="")

i hope you didnt translate it by hand. thats what computers are for. doing it in by hand is inefficient and that's why this text is so long. using string.maketrans() is recommended. now apply on the url.

这就是经过解密后的话了。

貌似,这个作者并不希望我们使用这个方法。。。额。。。我的内心几乎是崩溃的。。。

不过,还是来一遍的好~

 # -* - coding: UTF-8 -* -
#代码版本均为python 3.5.1
#Level 1
import string str1 = "g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj."
str2 = "map" table = str.maketrans(string.ascii_lowercase,string.ascii_lowercase[2:]+string.ascii_lowercase[:2])
#相信这个切片还是能够理解的
print (str1.translate(table))
print (str2.translate(table))

关于函数的介绍请看此链接

http://blog.csdn.net/wirelessqa/article/details/23793127

所以可以得到下一个网址(就是把map按照规则进行变形为ocr)

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

晚安~

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

  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 5

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

  6. pythonchallenge 解谜 Level 4

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

  7. pythonchallenge 解谜 Level 3

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

  8. pythonchallenge 解谜 Level 2

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

  9. pythonchallenge 解谜

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

随机推荐

  1. Spring mvc中@RequestMapping 6个基本用法

    Spring mvc中@RequestMapping 6个基本用法 spring mvc中的@RequestMapping的用法.  1)最基本的,方法级别上应用,例如: Java代码 @Reques ...

  2. 【python】with的实现方法

    来源:http://www.ibm.com/developerworks/cn/opensource/os-cn-pythonwith/#icomments 重点: with方法适用于需要分配和清理资 ...

  3. Ruby字符串

    在Ruby中的String对象持有和操纵的任意序列的一个或多个字节,通常表示人类语言的字符表示.简单的字符串文本括在单引号中,如 'This is a simple Ruby string liter ...

  4. Myeclipse导包总是报错,jar包路径都没问题

    是访问限制报错. 方法一: 全局属性Project>preferences>java>Compiler>Errors/Warnings>把右侧的[Deprecated a ...

  5. Dark Mobile Bank之移动银行应用仿冒攻击威胁分析报告

    一.背景 据“第十五次全国信息网络安全状况暨计算机和移动终端病毒疫情调查”调查结果显示,2015年移动终端的病毒感染比例为50.46%,相对于2014年增长了18.96%,移动终端病毒感染率涨幅较大, ...

  6. 解决CURL 请求本地超时

    首先,这样的问题只会出现在Windows+Nginx中. php-cgi 默认使用的是9000端口,即使多个进程也并发的是9000端口 在用户访问一个php页面的时候nginx已将该进程占用,在该进程 ...

  7. Win10商店东方财富网 UWP版更新,支持平板,PC,手机

    东方财富股份有限公司 近日向Win10商店提交了东方财富网V4.1版,这次为广大Win10平台用户带来了期待已久的桌面版本,可谓是良心厂商,值得鼓励和支持.4.1主要更新: 1. 支持桌面Window ...

  8. CSS 代码技巧与维护 ★ Mozilla Hacks – the Web developer blog

    原文链接:https://hacks.mozilla.org/2016/05/css-coding-techniques/ 译文链接 :http://www.zcfy.cc/article/css-c ...

  9. Mac 显示隐藏文件

    defaults write com.apple.finder AppleShowAllFiles -bool true 此命令显示隐藏文件defaults write com.apple.finde ...

  10. ring3硬件断点

    4个断点寄存器DR0~DR3用来设置断点的线性地址. DR6为状态寄存器,DR7为控制寄存器. DR4和DR5保留.当CR4.DE==1时,访问DR4和DR5产生#UD异常:IF CR4.DE==0, ...