onekey-depoly / sucode.py
dong625's picture
Upload sucode.py
aff0707 verified
raw
history blame
576 Bytes
import hashlib
import pytz
from datetime import datetime
def su(username):
tz = pytz.timezone('Asia/Shanghai')
current_time_day = datetime.now(tz).strftime('%Y%m%d')
services = ["webui", "sd3", "comfyui", "forge", "fooocus", "facefusion", "PaintsUNDO", "IClight", "ChatTTS", "Omost"]
passwords = {}
for service in services:
password_str = f"{username}{current_time_day}{service}"
password = f"{service}-{hashlib.sha256(password_str.encode()).hexdigest()[2:8]}"
passwords[service] = password
return passwords