支持自动化条件导出;优化引导页面提示;支持快速添加账号

This commit is contained in:
cc
2026-04-12 23:37:26 +08:00
parent 69a598f196
commit 86daa8ef06
19 changed files with 3765 additions and 688 deletions

View File

@@ -9,7 +9,7 @@ import crypto from 'crypto'
const execFileAsync = promisify(execFile)
type DbKeyResult = { success: boolean; key?: string; error?: string; logs?: string[] }
type ImageKeyResult = { success: boolean; xorKey?: number; aesKey?: string; error?: string }
type ImageKeyResult = { success: boolean; xorKey?: number; aesKey?: string; verified?: boolean; error?: string }
export class KeyService {
private readonly isMac = process.platform === 'darwin'
@@ -814,7 +814,7 @@ export class KeyService {
if (!this.verifyDerivedAesKey(aesKey, verifyCiphertext)) continue
onProgress?.(`密钥获取成功 (wxid: ${candidateWxid}, code: ${code})`)
console.log('[ImageKey] 校验命中: wxid=', candidateWxid, 'code=', code)
return { success: true, xorKey, aesKey }
return { success: true, xorKey, aesKey, verified: true }
}
}
return { success: false, error: '缓存 code 与当前账号 wxid 未匹配,请确认账号目录后重试,或使用内存扫描' }
@@ -826,7 +826,7 @@ export class KeyService {
const { xorKey, aesKey } = this.deriveImageKeys(fallbackCode, fallbackWxid)
onProgress?.(`密钥获取成功 (wxid: ${fallbackWxid}, code: ${fallbackCode})`)
console.log('[ImageKey] 回退计算: wxid=', fallbackWxid, 'code=', fallbackCode)
return { success: true, xorKey, aesKey }
return { success: true, xorKey, aesKey, verified: false }
}
// --- 内存扫描备选方案(融合 Dart+Python 优点)---