Last active
February 9, 2024 01:34
-
-
Save gjbianco/c561313a5f92c94a1672c07423f2e204 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/env python3 | |
# based on https://stackoverflow.com/a/17992126/117471 | |
import sys | |
from getpass import getpass | |
from passlib.hash import sha512_crypt | |
passwd = input() if not sys.stdin.isatty() else getpass() | |
print(sha512_crypt.encrypt(passwd)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment