Some python scrips for demonstrating chap protocol
Nevar pievienot vairāk kā 25 tēmas
Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
| 1234567891011121314 |
- #!/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() ) )
-
- # Print list of available methods
- print( s.system.listMethods() )
|