【原创】pythonchalleng——第13题
第十三题的网址: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错误。
现在是不会了,上网上搜索解决方案,我不得不崩溃……提示信息如下:
但是问题是,在我这,图片“ http://www.pythonchallenge.com/pc/return/evil4.jpg”根本显示不出来……好吧,就当我知道谁是那个邪恶的小子吧,它就是Bert!本题的目的就是希望挑战者使用xmlrpclib模块。好吧,本题的代码如下: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 xmlrpclibdef phoneEvil(name):
server=xmlrpclib.ServerProxy('http://www.pythonchallenge.com/pc/phonebook.php')result=server.phone(name)return resultif __name__=='__main__':
print phoneEvil('Bert')运行后的结果是:
555-ITALY
好了,把disproportional替换成ITALY试一试。哈哈,得到的结果是:
SMALL letters.
哦,原来要小写字母呀,那换成italy,也就是http://www.pythonchallenge.com/pc/return/italy.html。OK,可以进入14题!
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
