第十三题的网址:http://www.pythonchallenge.com/pc/return/disproportional.html,下面是该题目的截图,特此留念。
这道题的提示包括:- 标题:call him(就是那个邪恶的小子)
- Hit:phone that evil
- 源代码:发现数字5可以点击,触发的网址就是
http://www.pythonchallenge.com/pc/phonebook.php,点击进去,显示“faultCode 105 faultString XML error: Invalid document end at line 1, column 1”,是个xml错误。
现在是不会了,上网上搜索解决方案,我不得不崩溃……提示信息如下:
In the previous level we are dealing with evils. Then who is evil? The answer is here:
http://www.pythonchallenge.com/pc/return/evil4.jpg
Download the file and we can see the content is "Bert is evil! go back!"
OK... Now Bert is the evil guy.
How to call him? Post a simple xml to the interface http://www.pythonchallenge.com/pc/phonebook.php and it can be guessed that it's a xmlrpc proxy. Use xmlrpclib to call.#coding:utf-8
__author__ = 'hengha'
import xmlrpclib
def phoneEvil(name):
server=xmlrpclib.ServerProxy('http://www.pythonchallenge.com/pc/phonebook.php')
result=server.phone(name)
return result
if __name__=='__main__':
print phoneEvil('Bert')
运行后的结果是:
555-ITALY
好了,把disproportional替换成ITALY试一试。哈哈,得到的结果是:
SMALL letters.
哦,原来要小写字母呀,那换成italy,也就是http://www.pythonchallenge.com/pc/return/italy.html。OK,可以进入14题!