forked from ComputerTech/bastebin
22 lines
584 B
Python
22 lines
584 B
Python
#!/usr/bin/env python3
|
|
import getpass
|
|
from werkzeug.security import generate_password_hash
|
|
|
|
def main():
|
|
print("--- Bastebin Admin Password Hasher ---")
|
|
password = getpass.getpass("Enter the new admin password: ")
|
|
confirm = getpass.getpass("Confirm password: ")
|
|
|
|
if password != confirm:
|
|
print("Error: Passwords do not match.")
|
|
return
|
|
|
|
hashed = generate_password_hash(password)
|
|
print("\nSuccess! Copy the following hash into your config.json:")
|
|
print("-" * 20)
|
|
print(hashed)
|
|
print("-" * 20)
|
|
|
|
if __name__ == "__main__":
|
|
main()
|