send cursed htpasswd script

This commit is contained in:
decentral1se 2022-03-18 11:40:16 +01:00
parent 9de71d0a50
commit 327c7d4980
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
1 changed files with 12 additions and 0 deletions

12
scripts/genpw.py Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env python3
# https://prometheus.io/docs/guides/basic-auth/
# maya need to `apt install python3-bcrypt`
import getpass
import bcrypt
password = getpass.getpass("password: ")
hashed_password = bcrypt.hashpw(password.encode("utf-8"), bcrypt.gensalt())
print(hashed_password.decode())