browserutils / kooky

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

Is it possible to scan for cookies in none default Chromium profiles? #45

Closed PolicyPuma4 closed 11 months ago

PolicyPuma4 commented 3 years ago

I use multiple profiles in Edge for work. I seem to be unable to fetch cookies from my none default work profile. Is this possible with this package?

vaughany commented 2 years ago

I've just come across this issue with a little helper application I made, which I am gutting in order to use the kooky package (to support multiple browsers): while some user's cookies are stored in ~/.config/google-chrome/Default/Cookies, some other users' cookies are stored in ~/.config/google-chrome/Profile 1/Cookies. I cannot explain the difference as I have no control over or knowledge of the users computers, but being able to look in more than one place would be extremely useful.

srlehn commented 2 years ago

You can use kooky.FindAllCookieStores() while registering only the chrome cookie finder: import _ "github.com/zellyn/kooky/browser/chrome" this should locate all chrome profiles, which you then can filter for the one you want to use.

Or if you want to read a specific file, then load it with the browser specific ReadCookies() function: chrome.ReadCookies().