pharmacy dashboard

This commit is contained in:
2026-11-24 12:07:35 +05:30
commit 72c8b59054
56 changed files with 38778 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
import sqlite3
from werkzeug.security import check_password_hash
conn = sqlite3.connect('users.db')
c = conn.cursor()
c.execute("SELECT id, username, password, is_admin FROM users ORDER BY id")
users = c.fetchall()
candidates = [
'dmh123', 'TestPass123!', 'password', 'password123', 'admin', 'admin123', '123456'
]
print(f"{'ID':<4} | {'Username':<18} | {'Role':<10} | {'Password'}")
print("-" * 55)
for uid, uname, phash, is_adm in users:
role = "ADMIN" if is_adm else "Staff/User"
matched = "Unknown"
for cand in candidates:
if check_password_hash(phash, cand):
matched = cand
break
print(f"{uid:<4} | {uname:<18} | {role:<10} | {matched}")