-
Notifications
You must be signed in to change notification settings - Fork 0
/
challenge13.py
24 lines (17 loc) · 955 Bytes
/
challenge13.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#############################################################################
#Challenge 13: http://www.pythonchallenge.com/pc/return/disproportional.html#
#############################################################################
# Clicking the phone gives an XML error, and an RPC fault
# so it's probably solved via RPC to that address
import xmlrpc.client
server = xmlrpc.client.ServerProxy('http://www.pythonchallenge.com/pc/phonebook.php')
# let's see what methods are available
for method in server.system.listMethods():
print(method)
print(server.system.methodHelp(method))
# The only non-standard method is phone, but it needs parameters.
# Anything other than the right string returns "He is not the evil"
# When we tried evil4.jpg in last challenge in Chrome it just shows
# a square, but in IE it shows "Bert is evil! Go back!" so we'll use 'Bert'
print(server.phone('Bert'))
# This returns our keyword