Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1606383
  • 博文数量: 245
  • 博客积分: 10378
  • 博客等级: 上将
  • 技术积分: 2571
  • 用 户 组: 普通用户
  • 注册时间: 2009-03-27 08:19
文章分类

全部博文(245)

文章存档

2013年(4)

2012年(8)

2011年(13)

2010年(68)

2009年(152)

分类: Python/Ruby

2010-11-16 21:06:06

挑战地址:
 
 
打开时, 图片,一本翻开的书:
一行字:
recognize the characters. maybe they are in the book,
but MAYBE they are in the page source.
 
but MAYBE they are in the page source.
 
这句话告诉你信息在本页面的源码里边,打开该页面的HTML源码,发现有一大堆的乱码,不要以为是什么复杂的加密,就是一大堆的乱码,夹杂了为数很少的字母,便利乱码,如果是字母就提取出来。
 
事先把乱码保存在d:1.txt中
 

import string

file = open("d:\\1.txt","r")
text = str( file.read() )
dst =[]
src=""
as_text= string.ascii_letters

for i in as_text:
    dst.append(i)


for i in text:
    try:
        dst.index(i)
        src +=i
    except Exception:
            continue
           

print( src )

打印的结果是:

equality

直接访问页面:

过关!!!

对字符串操作很不熟练,弄的很麻烦。

阅读(1382) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~