Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import sys;
- import getpass;
- import crypt;
- import uuid;
- password = getpass.getpass("New Password: ");
- salt = uuid.uuid4().hex [0:8];
- #print("Pass:",password);
- #print("Salt:",salt);
- hash=crypt.crypt(password, "$6$"+salt+"$");
- if len(sys.argv) > 1:
- username = sys.argv[1]
- print(username+": {CRYPT}"+hash);
- else:
- print("{CRYPT}"+hash);
Add Comment
Please, Sign In to add comment