有趣的Python Challenge编程解谜游戏第13关

**有趣的Python Challenge编程解谜游戏第13关**

介绍

游戏介绍

平时自己学python,大家肯定很是无聊,推荐一个很早之前的网页版python闯关游戏——Python Challenge,虽然说这个网站很早了,但是很有意思,你会发现这些游戏一点也不简单,基本都需要通过编程来解决……

有意思的是,这是个解谜游戏,所以需要你细心去发现线索,破解谜底,并且考察的知识量也不是很小,很有意思。

游戏链接:http://www.pythonchallenge.com/

界面是这样的:

点击图中Click here to get challenged开始挑战。

全解(持续更新)

Python challenge 全解(持续更新中)

第13关

在这里插入图片描述
打电话???打给谁???怎样打??提示是phone that evil,想起了什么??查看源代码:


<html>
<head>
  <title>call him</title>
  <link rel="stylesheet" type="text/css" href="../style.css">
</head>
<body>
<center>
<img src="disprop.jpg" width="640" height="480" border="0" usemap="#evil" />
	<map name="evil">
		<area shape="circle" coords="326,177,45" href="../phonebook.php" />
	</map>
<font color="gold"/>
<br><b>
	phone that <remote /> evil
</br>
</html>

看起来有用的就是一个phonebook.php吧,电话本??打开:(事实上图片中的“5”也可以点击到达这里:)

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<methodResponse>
<fault>
<value>
<struct>
<member>
<name>faultCode</name>
<value>
<int>105</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>
XML error: Invalid document end at line 1, column 1
</string>
</value>
</member>
</struct>
</value>
</fault>
</methodResponse>

出错了?????????这一关其实有点偏难怪。说的太专业大家也听不懂。
上代码:

import xmlrpc.client
with xmlrpc.client.ServerProxy("http://www.pythonchallenge.com/pc/phonebook.php") as pb:
    print(pb.system.listMethods())
# 先看看有什么能用的

结果:

['phone', 'system.listMethods', 'system.methodHelp', 'system.methodSignature', 'system.multicall', 'system.getCapabilities']

这可太值得兴奋了因为看见了phone
接下来了解一下phone

import xmlrpc.client
with xmlrpc.client.ServerProxy("http://www.pythonchallenge.com/pc/phonebook.php") as pb:
	print(pb.system.methodHelp('phone'))

结果是

Returns the phone of a person

就是给人打电话。。。。。那就打吧。。

……………………
print(pb.phone('evil'))

结果是:

He is not the evil

这就尴尬了。绝境???其实不是,大家看见evil应该能想到上一关的图4其实是没有加载出来的,接下来看看它到底藏了什么东西:

with open('evil4.jpg') as f:
    de=f.read()
    print(de)

柳暗花明啊,结果是:

Bert is evil! go back!

最终代码:

import xmlrpc.client

with xmlrpc.client.ServerProxy("http://www.pythonchallenge.com/pc/phonebook.php") as pb:
    
    print(pb.phone('Bert'))

结果:

555-ITALY

用ITALY尝试得到:是小写。。

SMALL letters.

于是得到italy,得到新的url:

结果链接

http://www.pythonchallenge.com/pc/return/italy.html

第14关预告

在这里插入图片描述
能想到什么??????

发布了9 篇原创文章 · 获赞 12 · 访问量 578

猜你喜欢

转载自blog.csdn.net/weixin_46283214/article/details/105471156
今日推荐