Created
April 19, 2020 14:16
-
-
Save kfiresmith/61082d0c430359e185ecf22870bc052a to your computer and use it in GitHub Desktop.
kickstart sh512 password hasher
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python | |
# Prompt user for a password string, then create a salted SHA512 hash | |
import crypt | |
import getpass | |
import sys | |
sys.dont_write_bytecode = True | |
userinput = getpass.getpass(prompt='Enter a password string to hash in SHA-512: ') | |
print(crypt.crypt(userinput, crypt.mksalt(crypt.METHOD_SHA512))) | |
sys.exit(0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment