diff options
author | Robey Pointer <robey@lag.net> | 2006-08-01 11:20:53 -0700 |
---|---|---|
committer | Robey Pointer <robey@lag.net> | 2006-08-01 11:20:53 -0700 |
commit | 7ac433a6ac7b2cdf8608e8571102d599a15febde (patch) | |
tree | 36c2d7ad639a104300a583a03d3b8ebcf5b5feb8 /demos/demo_server.py | |
parent | 157484f5eb0132b7676e871862a9b3ff9e38508b (diff) |
[project @ robey@lag.net-20060801182053-a74d120228b8009a]
use hexlify instead of custom-made hexify in demos
Diffstat (limited to 'demos/demo_server.py')
-rw-r--r-- | demos/demo_server.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/demos/demo_server.py b/demos/demo_server.py index 345a12fd..83ff399d 100644 --- a/demos/demo_server.py +++ b/demos/demo_server.py @@ -19,6 +19,7 @@ # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. import base64 +from binascii import hexlify import os import socket import sys @@ -34,7 +35,7 @@ paramiko.util.log_to_file('demo_server.log') host_key = paramiko.RSAKey(filename='test_rsa.key') #host_key = paramiko.DSSKey(filename='test_dss.key') -print 'Read key: ' + paramiko.util.hexify(host_key.get_fingerprint()) +print 'Read key: ' + hexlify(host_key.get_fingerprint()) class Server (paramiko.ServerInterface): @@ -60,7 +61,7 @@ class Server (paramiko.ServerInterface): return paramiko.AUTH_FAILED def check_auth_publickey(self, username, key): - print 'Auth attempt with key: ' + paramiko.util.hexify(key.get_fingerprint()) + print 'Auth attempt with key: ' + hexlify(key.get_fingerprint()) if (username == 'robey') and (key == self.good_pub_key): return paramiko.AUTH_SUCCESSFUL return paramiko.AUTH_FAILED |