browserutils / kooky

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

Firefox cookies unable to be found with domain filter #68

Closed DP19 closed 3 months ago

DP19 commented 10 months ago

Finding cookies via chrome was working but once I switched to firefox it no longer works.

The sites i'm reading cookies for will set these cookies at a sub-domain like .$env.$tld

When ReadCookies is called for chrome it uses the host_key as the domain which is that sub domain shown above https://github.com/browserutils/kooky/blob/master/internal/chrome/chrome.go#L45

However in the Firefox implementation it's doing a tld domain lookup which only returns and sets the tld on the cookie, which fails the domain filter https://github.com/browserutils/kooky/blob/master/internal/firefox/firefox.go#L51

This is also stored in firefox's sql lite at the sub domain level.

Why do the TLD look-up there? Should this not just return the host as the domain?