22 lines
694 B
Python
22 lines
694 B
Python
import sqlite3
|
|
from werkzeug.security import check_password_hash
|
|
|
|
conn = sqlite3.connect('users.db')
|
|
c = conn.cursor()
|
|
c.execute('SELECT username, password, is_admin FROM users')
|
|
rows = c.fetchall()
|
|
|
|
candidates = [
|
|
'dmh', 'dmh123', 'admin', 'admin123', 'dmh@123', 'password', 'password123',
|
|
'dmh2024', 'dmh2026', 'dmhospital', 'nirajAi26@DMH', 'TestPass123!', '123456',
|
|
'dmh@dmh', 'Dmh@123', 'Dmh123', 'dmh@2024', 'dmh@2025', 'dmh@2026'
|
|
]
|
|
|
|
for uname, phash, is_adm in rows:
|
|
matched = None
|
|
for cand in candidates:
|
|
if check_password_hash(phash, cand):
|
|
matched = cand
|
|
break
|
|
print(f"User: {uname} (Admin: {is_adm}) -> Password: {matched}")
|