browserutils / kooky

Go code to read cookies from browser cookie stores.
MIT License
204 stars 41 forks source link

Many chrome cookies cannot be decrypted successfully at Linux #38

Closed roberChen closed 2 years ago

roberChen commented 3 years ago

output is like this

decrypting cookie &{.visualstudio.com _ga / 2022-11-04 17:18:22 +0800 CST false false 2185-07-22 07:34:33.780741616 +0800 CST }: unknown encryption method
srlehn commented 3 years ago

Are you using Chrome or Chromium?

I was thinking about separating both. The browser field needed for querying the correct keyring was not set to chrome or chromium specifically in the chrome.ReadCookies() (not the method).

https://github.com/zellyn/kooky/commit/78c80ce20b0537993cd10c78096366d08516e59d#diff-127d43eeeacc96d34b503a9dc12f1709f2dd38dc049ece770e57e0e61d932fcbL13 https://github.com/zellyn/kooky/blob/78c80ce20b0537993cd10c78096366d08516e59d/internal/chrome/chrome_linux.go#L71

With 78c80ce it is now set to chromium on linux.

I might separate chromium from chrome into its own package.

roberChen commented 3 years ago

I'm using chrome

Repository      : archlinuxcn
Name            : google-chrome
Version         : 86.0.4240.193-1
Description     : The popular and trusted web browser by Google (Stable Channel)
Architecture    : x86_64
URL             : https://www.google.com/chrome
Licenses        : custom:chrome
Groups          : None
Provides        : None
Depends On      : alsa-lib  gtk3  libcups  libxss  libxtst  nss
Optional Deps   : libpipewire02: WebRTC desktop sharing under Wayland
                  kdialog: for file dialogs in KDE
                  gnome-keyring: for storing passwords in GNOME keyring
                  kwallet: for storing passwords in KWallet
                  gtk3-print-backends: for printing
                  libunity: for download progress on KDE
                  ttf-liberation: fix fonts for some PDFs - CRBug #369991
                  xdg-utils
Required By     : None
Optional For    : chromedriver  lastpass  uget-integrator-chrome  webapp-manager
Conflicts With  : None
Replaces        : None
Download Size   : 73.25 MiB
Installed Size  : 228.04 MiB
Packager        : lilac (on behalf of Megumi_fox) <i@megumifox.com>
Build Date      : Tue Nov 10 09:31:34 2020
MD5 Sum         : 1ea251febf7a54163575bb3630c30442
SHA-256 Sum     : 5eb215047d07d4ebbf1c3eebf4fd067b8ec1f8a91a8454089e93f3be4767d933
Signatures      : F9F9FA97A403F63E