Some python scrips for demonstrating chap protocol
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
| 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() )
|