Repository navigation
fix(chromeauth): 修復 Chrome Web Data 鎖定無法讀取及非 DBSC 帳號匯入 - #68
Merged
Merged
Conversation
- 實作 openWebData 拷貝 Web Data 及其 WAL 日誌快照至臨時目錄讀取,解決 Chrome 運行時 SQLITE_BUSY (database is locked) 導致帳號未被偵測到的問題 - 放寬 Importable 與 readTokenService 對 bindingKey 的強制非空要求,允許無 DBSC 設備綁定之 v20 token 正常識別為可匯入 - 在 fetchGoogleCookies 中新增無 wrappedKey 時直接調用 requestMultilogin 的降級流程,並支援非 DBSC 標頭編碼與存儲 Co-Authored-By: Claude Code <noreply@anthropic.com>
Owner
|
测试发现排他锁不影响现行读取,其余的都是确实的问题,晚一些会合入 |
Mag1cFall
force-pushed
the
fix-chrome-token-import
branch
from
October 20, 2026 05:15
abc1b48 to
3a5f4ca
Compare
- Web Data 与其 WAL 日志按 Profile 复制一次到临时目录后以文件 URI 只读打开,路径中的 # 与 % 按 URI 转义,读取后删除副本,复制失败时报错 - 没有设备绑定密钥的账号以 MultiBearer 头请求 OAuthMultilogin 取得明文 Cookie,绑定与无绑定路径拆为两个函数并共用 Cookie 核对 - 协议文档、README 与注释写明无绑定密钥账号的导入与续签方式
Mag1cFall
force-pushed
the
fix-chrome-token-import
branch
from
October 20, 2026 05:32
3a5f4ca to
61a1594
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
本 PR 解決 Windows 下 Chrome 帳號無法讀取、偵測不到,以及缺乏 DBSC 硬體綁定金鑰之帳號無法匯入的問題:
1. 解決 Chrome 執行時
database is locked (SQLITE_BUSY)Web Data會因檔案排他鎖拋出SQLITE_BUSY: database is locked,或因immutable=1遺漏尚未刷盤的 WAL 日誌,導致管理端在掃描帳號時全部失敗或無法偵測到。internal/chromeauth/platform_windows.go中新增openWebData,透過將Web Data主檔及其-wal、-shm快照拷貝至暫存目錄後再開啟連線,讀取完畢後安全銷毀暫存目錄,100% 避開 Chrome 處理程序鎖定並確保即時取得最新記錄。2. 支援無 DBSC 設備綁定(非硬體金鑰綁定)帳號匯入
token_service資料表中的binding_key欄位為空(NULL 或 0 長度),但其encrypted_token具備完整的v20AES 加密權杖。discoverPlatform與readTokenService對len(bindingKey) != 0的硬性限制,允許具備有效v20權杖的帳號標記為Importable: true。internal/chromeauth/protocol.go中,於len(wrappedKey) == 0時提供空 assertion 之requestMultilogin降級呼叫流程,直接驗證並取得SAPISID與__Secure-1PSID,同時在encodeMultiOAuthHeader與ChromeOAuthMaterial中允許省略 assertion 與 binding key。🤖 Generated with Claude Code