import platform import uuid from .config import DATA_DIR, HWID_FILE def get_hwid() -> str: """Get or generate hardware ID""" DATA_DIR.mkdir(parents=True, exist_ok=True) if HWID_FILE.exists(): return HWID_FILE.read_text().strip() # Generate new random HWID hwid = uuid.uuid4().hex[:16] HWID_FILE.write_text(hwid) return hwid def get_system_info() -> dict: """Get system information for headers""" system = platform.system().lower() # windows, linux, darwin version = platform.release() # 10, 5.15.0, 22.0.0 return { "os": system, "version": version }