`
文章列表
URI: http://www.pythonchallenge.com/pc/return/disproportional.html Username: huge; password: file 说明: — 解题方法: import xmlrpclib conn = xmlrpclib.ServerProxy("http://www.pythonchallenge.com/pc/phonebook.php") print conn.phone("Bert") 过关答案: italy
URI: http://www.pythonchallenge.com/pc/return/evil.html Username: huge; password: file 说明: — 解题方法: # Get the data from: http://www.pythonchallenge.com/pc/return/evil2.gfx h = open("evil2.gfx", "rb") data = h.read() h.close() new_data = [[], [], [], [], []] n = 0 fo ...
URI: http://www.pythonchallenge.com/pc/return/5808.html Username: huge; password: file 说明: — 解题方法: import Image # download the image from: http://www.pythonchallenge.com/pc/return/cave.jpg image = Image.open("cave.jpg") nsize = tuple([x / 2 for x in image.size]) odd = even = I ...
URI: http://www.pythonchallenge.com/pc/return/bull.html Username: huge; password: file 说明: — 解题方法: import itertools def look_and_say (length): table = { ("1", "1", "1"): "31", ("1", "1"): "21", ...
URI: http://www.pythonchallenge.com/pc/return/good.html  Username: huge; password: file 说明: — 解题方法: import Image # Get this from the challenge page's HTML source: first = ( 146, 399, 163, 403, 170, 393, 169, 391, 166, 386, 170, 381, 170, 371, 170, 355, 169, 346, 167, 335, 170, ...
URI: http://www.pythonchallenge.com/pc/def/integrity.html 说明: 屏幕显示一个蜜蜂图片。查看页面源代码可以看到里面提示有加过密的用户名、密码。 点击蜜蜂可进入一个需要输入口令的页面,说明此题应该就是解开用户名、密码 解题方法: Possible Solution: import bz2 un = "BZh91AY&SYA\xaf\x82\r\x00\x00\x01\x01\x80\x02\xc0\x02\x00 \x00!" \ "\x9ah3M\x07<]\xc ...
URI: http://www.pythonchallenge.com/pc/def/oxygen.html 说明: PNG文件有一条不寻常的灰色条,答案就隐藏在里面 这题要用 Python Imaging Library (PIL)的Image模块http://www.pythonware.com/products/pil/ 解题方法: import re, Image i = Image.open("oxygen.png") # http://www.pythonchallenge.com/pc/def/oxygen.png row = [i.get ...
URI: http://www.pythonchallenge.com/pc/def/channel.html 说明: title提示是一对。 源代码中出现〈!-- 〈-- zip --〉字样 从http://www.pythonchallenge.com/pc/def/channel.zip 下载zip文件 (提示够变态吧) 打开zip文件中的readme.txt 可以看到 welcome to my zipped list. hint1: start from 90052 hint2: answer is inside the zip 感觉解题思路基本上和上面那个反复调用url的题一样 ...
URI: http://www.pythonchallenge.com/pc/def/peak.html 说明: peak hell 读出声来 Pickle source page中有如下显示查看http://www.pythonchallenge.com/pc/def/banner.p 解题方法: import pickle, urllib handle = urllib.urlopen("http://www.pythonchallenge.com/pc/def/banner.p") data = pickle.load(handle) hand ...
URI: http://www.pythonchallenge.com/pc/def/linkedlist.html 说明: 按提示将linkedlist.html改成likedlist.php进入level 4 从title和图片可以看出来这题就像打水井一样,需要一遍又一遍的机械进行才能获得答案。 page source显示图片的href 后面有一个nothing=12345的调用 urllib may help. DON'T TRY ALL NOTHINGS, since it will never end. 400 times is more than enough. 调用linke ...
URI: http://www.pythonchallenge.com/pc/def/equality.html 说明: title中提示使用正则re,页面显示两侧被3个(且只为3个)大写字母包围的小写字母    page source中有待处理的数据   解题方法: import re data = ''' ''' # 页面中的数据 print "".join(re.findall("[^A-Z]+[A-Z]{3}([a-z])[A-Z]{3}[^A-Z]+", data)) 过关答案: linkedl ...
URI: http://www.pythonchallenge.com/pc/def/ocr.html 说明: 图画中出现一本很模糊的书,但真正的答案要从页面的源代码中找 提示1:recognize the characters. maybe they are in the book, but MAYBE they are in the page source. 提示2:find rare characters in the mess 解题方法: import re data = ''' ''' #三引号中填入页面的数据 print " ...
URI: http://www.pythonchallenge.com/pc/def/map.html 说明: 图片中显示出字符转换的规律k->m, o->q, e->g 提示用string.maketrans() 解决方法: import string original = "g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc " \ "dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr' ...
URI: http://www.pythonchallenge.com/pc/def/0.html 说明: 出现一幅画面,上面写着2的38次方 解题方法: print 2**38 过关答案: 274877906944
用python来对Excel的数据进行处理的例子 这段代码会在D盘自动生成一个xls文件。 import os, sys, time import win32com.client import traceback excel = win32com.client.Dispatch("Excel.Application") filename = "D:\\test.xls" try: d1 = excel.Workbooks.Add() sheet = d1.Sheets(1) ...
Global site tag (gtag.js) - Google Analytics