Skip to content

Comments

feat: add Linux Chrome/Chromium cookie extraction support#3

Open
Whamp wants to merge 1 commit intonicobailon:mainfrom
Whamp:feat/linux-cookie-extraction
Open

feat: add Linux Chrome/Chromium cookie extraction support#3
Whamp wants to merge 1 commit intonicobailon:mainfrom
Whamp:feat/linux-cookie-extraction

Conversation

@Whamp
Copy link

@Whamp Whamp commented Feb 4, 2026

Summary

Cookie extraction now works on Linux with GNOME Keyring. Previously, Linux users needed API keys—now they can use their browser session like macOS users.

Changes

  • Detect cookie database path: Chromium (~/.config/chromium/) first, then Chrome (~/.config/google-chrome/)
  • Retrieve encryption password via secret-tool lookup with fallback to hardcoded "peanuts"
  • Decrypt v10/v11 cookies using AES-128-CBC with PBKDF2 (1 iteration), matching Chromium's os_crypt_linux.cc
  • Handle SHA256 hash prefix for database version ≥ 24
  • Update README limitations and file descriptions

Tested on

  • Arch Linux (Omarchy) with Chromium and GNOME Keyring
  • Extracted 16 Google cookies including all 6 essential Gemini auth cookies
  • Verified web_search and fetch_content work without API keys

Should work on

  • Linux with GNOME Keyring or compatible Secret Service implementation
  • Linux without keyring (uses Chrome's default "peanuts" password)

Not yet supported

  • KDE with KWallet
  • Flatpak/Snap browser installations (different paths)

Notes

  • macOS codepath unchanged
  • Requires libsecret (secret-tool CLI) for keyring access

- Add platform abstraction for cookie database path detection
- Support both Chromium (~/.config/chromium) and Chrome (~/.config/google-chrome)
- Implement GNOME Keyring password retrieval via secret-tool
- Add fallback to hardcoded 'peanuts' password when no keyring available
- Implement v10/v11 decryption using AES-128-CBC with PBKDF2 (1 iteration)
- Handle SHA256 hash prefix for database version >= 24
- Update README with Linux platform support documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant