contrib/prometheus-node-exporter/gen-pass.py

8 lines
198 B
Python
Executable File

#!/usr/bin/python3
import getpass
import bcrypt
password = getpass.getpass("password: ")
hashed_password = bcrypt.hashpw(password.encode("utf-8"), bcrypt.gensalt())
print(hashed_password.decode())