Spaces:
Paused
Paused
Download scratch/reset_super.py from 3SCError404/nexus: direct link, hf CLI and curl.
- Browser
- Download file 723 Bytes
-
https://huggingface.co/spaces/3SCError404/nexus/resolve/main/scratch/reset_super.py
- Command line
-
hf download hf://spaces/3SCError404/nexus/scratch/reset_super.py
-
curl -L -o reset_super.py https://huggingface.co/spaces/3SCError404/nexus/resolve/main/scratch/reset_super.py
723 Bytes
| import asyncio | |
| from sqlalchemy import select | |
| from core.database import async_session_factory | |
| from core.security import get_password_hash | |
| from models.user import User | |
| async def reset_super_pass(): | |
| async with async_session_factory() as db: | |
| stmt = select(User).where(User.email == "admin@3sc.com") | |
| res = await db.execute(stmt) | |
| user = res.scalar_one_or_none() | |
| if user: | |
| user.hashed_password = get_password_hash("password123") | |
| db.add(user) | |
| await db.commit() | |
| print("Password reset for admin@3sc.com to password123") | |
| else: | |
| print("User admin@3sc.com not found") | |
| if __name__ == "__main__": | |
| asyncio.run(reset_super_pass()) | |