| 1234567891011121314151617 |
- #!/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
- session, key = s.init()
- password_hash = hashlib.sha256( ( 'Test123' + key ).encode( 'utf-8' ) ).hexdigest();
-
- # does the actual authentication
- print( s.auth( session, password_hash ) )
- # tests protected method
- print( s.hello( session ) )
- # logs out cause anything seems to be done already
- print( s.logout( session, password_hash ) )
|