- #!/usr/bin/env python2
-
- import xmlrpc.client
- import hashlib
-
- # connects to the XMLRPC Server
- s = xmlrpc.client.ServerProxy('http://localhost:8000')
- # initalized the login process
- key = s.init()
- # does the actual authentication
- print( s.auth( hashlib.sha256( ( 'Test123' + key ).encode( 'utf-8' ) ).hexdigest() ) )
- # tests protected method
- print( s.hello() )
-
- # Print list of available methods
- print( s.system.listMethods() )
|