bin-utils/pass_ssha_salt.py
2015-05-30 18:42:42 +02:00

5 lines
202 B
Python
Executable File

#!/usr/bin/env python
import base64, getpass, hashlib, os
salt = os.urandom(8) # edit the length as you see fit
print '{SSHA}' + base64.b64encode(hashlib.sha1(getpass.getpass() + salt).digest() + salt)