Discussion:
Enumerating all persistent cookies
(too old to reply)
Matt Campbell
2007-11-05 18:40:42 UTC
Permalink
Hello:

What is the best way to enumerate all persistent cookies stored by
wininet for the current user? Does one have to traverse the Cookies
directory and parse the files, or does WinInet provide an easier way?

Thanks,
Matt
Dan Mitchell
2007-11-05 20:26:45 UTC
Permalink
Post by Matt Campbell
What is the best way to enumerate all persistent cookies stored by
wininet for the current user? Does one have to traverse the Cookies
directory and parse the files, or does WinInet provide an easier way?
FindFirstURLCacheEntry/FindNextURLCacheEntry. I found that passing
"cookie:" as the search pattern didn't work, so I just went through them
all and checked lpCacheEntry->CacheEntryType & COOKIE_CACHE_ENTRY.

That gets you the files on disk, parsing them from there is up to you --
http://seclists.org/basics/2006/Mar/0427.html has a starting point, and I
did use Galleta for more info.

-- dan

Loading...