feat(cookies): cross-profile cookies export / cookies transfer
Transferring a logged-in session between Chrome profiles previously needed an ad-hoc external script to decrypt the source profile's cookie store. Make it first-class: - `cookies export --from <profile> [--domain <d>[,<d>]]` decrypts another profile's on-disk cookies and prints CDP-shaped JSON for `cookies set --curl`. - `cookies transfer --from <profile> [--domain <d>]` exports + injects into the connected browser in one shot (reuses the cookies_set path). Source profile is resolved by directory name, display name, or "auto". The store is copied to a temp file (immune to a running Chrome's lock/WAL), read via sqlite3, and values are decrypted (macOS v10: AES-128-CBC, key from the shared 'Chrome Safe Storage' Keychain entry). httpOnly/secure/per-domain auth cookies round-trip intact; SameSite=None without Secure is downgraded so CDP accepts it. macOS only for now (clear error elsewhere).
This commit is contained in:
@@ -3101,6 +3101,10 @@ Network: chrome-use network <action>
|
||||
Storage:
|
||||
cookies [get|set|clear] Manage cookies (set supports --url, --domain, --path, --httpOnly, --secure, --sameSite, --expires)
|
||||
Or: cookies set --curl <file> [--domain <host>] (auto-detects JSON/cURL/Cookie-header files)
|
||||
cookies export --from <profile> [--domain <d>[,<d>]]
|
||||
Decrypt another Chrome profile's cookies -> JSON for `cookies set --curl` (macOS)
|
||||
cookies transfer --from <profile> [--domain <d>[,<d>]]
|
||||
Copy a logged-in session from another profile into the connected browser (macOS)
|
||||
storage <local|session> Manage web storage
|
||||
|
||||
Tabs:
|
||||
|
||||
Reference in New Issue
Block a user