mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-03-01 08:10:25 +00:00
Add Registry20 GUID management and DPAPI support
Introduce tools and UI to read, write, backup and restore QQ Registry20 GUIDs using Windows DPAPI. Adds a Python CLI (guid_tool.py) for local Registry20 operations and a new TypeScript package napcat-dpapi with native bindings for DPAPI. Implements Registry20Utils in the webui-backend to protect/unprotect Registry20, plus backup/restore/delete helpers. Exposes new backend API handlers and routes (get/set GUID, backups, restore, reset, restart) and integrates frontend GUIDManager component and qq_manager controller methods. Propagates QQ data path via WebUiDataRuntime (setter/getter) and wires it up in framework/shell; updates Vite alias and package.json to include the new dpapi workspace. Includes native addon binaries for win32 x64/arm64 and basic tsconfig/readme/license for the new package.
This commit is contained in:
@@ -101,4 +101,36 @@ export default class QQManager {
|
||||
passwordMd5,
|
||||
});
|
||||
}
|
||||
|
||||
public static async resetDeviceID () {
|
||||
await serverRequest.post<ServerResponse<null>>('/QQLogin/ResetDeviceID');
|
||||
}
|
||||
|
||||
public static async restartNapCat () {
|
||||
await serverRequest.post<ServerResponse<null>>('/QQLogin/RestartNapCat');
|
||||
}
|
||||
|
||||
public static async getDeviceGUID () {
|
||||
const data = await serverRequest.post<ServerResponse<{ guid: string; }>>('/QQLogin/GetDeviceGUID');
|
||||
return data.data.data;
|
||||
}
|
||||
|
||||
public static async setDeviceGUID (guid: string) {
|
||||
await serverRequest.post<ServerResponse<null>>('/QQLogin/SetDeviceGUID', { guid });
|
||||
}
|
||||
|
||||
public static async getGUIDBackups () {
|
||||
const data = await serverRequest.post<ServerResponse<string[]>>('/QQLogin/GetGUIDBackups');
|
||||
return data.data.data;
|
||||
}
|
||||
|
||||
public static async restoreGUIDBackup (backupName: string) {
|
||||
await serverRequest.post<ServerResponse<null>>('/QQLogin/RestoreGUIDBackup', { backupName });
|
||||
}
|
||||
|
||||
public static async createGUIDBackup () {
|
||||
const data = await serverRequest.post<ServerResponse<{ path: string; }>>('/QQLogin/CreateGUIDBackup');
|
||||
return data.data.data;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user