diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2025-02-26 23:48:58 +0100 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2025-02-26 23:55:19 +0100 |
commit | 1f3112a6dcecd0977e76564d4fc68a4f0be2db25 (patch) | |
tree | 4178aa39f2ba22342ccd3c7ec3c5769ee2af5ba1 /demos/demo_keygen.py | |
parent | ed8b09751ff20340332d4b1bb2b10e32aedc57ff (diff) | |
parent | 5e850d743c4d754f191332f0c4d9d1d9713702e6 (diff) |
Fix and improve demo programs #2408
Merge remote-tracking branch 'smlavine/main'
Diffstat (limited to 'demos/demo_keygen.py')
-rwxr-xr-x | demos/demo_keygen.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/demos/demo_keygen.py b/demos/demo_keygen.py index 12637ed0..f9286f6a 100755 --- a/demos/demo_keygen.py +++ b/demos/demo_keygen.py @@ -18,6 +18,9 @@ # along with Paramiko; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +""" +Demonstrates Paramiko's native keygen capabilities. +""" import sys from binascii import hexlify @@ -26,7 +29,7 @@ from optparse import OptionParser from paramiko import DSSKey from paramiko import RSAKey from paramiko.ssh_exception import SSHException -from paramiko.py3compat import u +from paramiko.util import u usage = """ %prog [-v] [-b bits] -t type [-N new_passphrase] [-f output_keyfile]""" @@ -167,7 +170,7 @@ if __name__ == "__main__": "Fingerprint: %d %s %s.pub (%s)" % ( bits, - ":".join([hash[i : 2 + i] for i in range(0, len(hash), 2)]), + ":".join([hash[i: 2 + i] for i in range(0, len(hash), 2)]), filename, ktype.upper(), ) |