auto-commit for 020628f5-4bfa-4157-a41e-90eec0ddfeec

This commit is contained in:
emergent-agent-e1
2026-05-06 03:47:14 +00:00
parent 6f31e2d1bf
commit 39fbd407ec
33 changed files with 2887 additions and 0 deletions
+48
View File
@@ -0,0 +1,48 @@
#!/usr/bin/env python3
"""
Setup script to generate admin password hash for MySQL database
"""
from passlib.context import CryptContext
import getpass
pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
def main():
print("=" * 60)
print("Epic Travel & Expeditions - Admin Password Setup")
print("=" * 60)
print()
password = input("Enter admin password (or press Enter for default 'Joker1974!!!'): ").strip()
if not password:
password = "Joker1974!!!"
print(f"Using default password: {password}")
print("\nGenerating bcrypt hash...")
password_hash = pwd_context.hash(password)
print("\n" + "=" * 60)
print("PASSWORD HASH GENERATED")
print("=" * 60)
print(f"\nPassword: {password}")
print(f"\nHash: {password_hash}")
print("\n" + "=" * 60)
print("\nSQL UPDATE COMMAND:")
print("=" * 60)
print(f"""
UPDATE admin_users
SET password_hash = '{password_hash}'
WHERE email = 'admin@epictravel.com';
""")
print("\nCopy the hash above and update your database.")
print("Or run the SQL UPDATE command in phpMyAdmin.")
print()
if __name__ == "__main__":
try:
main()
except KeyboardInterrupt:
print("\n\nOperation cancelled.")
except Exception as e:
print(f"\nError: {e}")