Some python scrips for demonstrating chap protocol
Vous ne pouvez pas sélectionner plus de 25 sujets
Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
| 12345678910111213141516 |
- #!/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() )
|