(OT) Where Are Cookies Stored?

Dave Angel davea at ieee.org
Wed Dec 16 10:33:00 EST 2009



Victor Subervi wrote:
> On Tue, Dec 15, 2009 at 6:57 PM, r0g <aioe.org at technicalbloke.com> wrote:
>
> <snip>
>> Cookies in FF for Windows are stored in an sqlite database in here...
>>
>> ~\Application Data\Mozilla\Firefox\Profiles\%XYZ%\firefox_profile\
>>
>>     
>
> Man, I searched C drive (the only drive) on this computer where I'm working
> (Internet cafe) for "Application Data" and nuttin.
> V
>
>   
How are you searching?  Microsoft is so sure we don't want to see the 
gory details that they hide all sorts of things, by default.  And 
especially on a public computer, you shouldn't even look with Explorer.  
As for searching with Explorer, there are not only design problems, but 
bugs as well.  Get a command line, and do something like:

     dir  /s  c:\Firefox

if you search directly for Application Data, you have to be sure to 
properly use quotes.  You also need to add the /ah switch, since it's a 
hidden directory.  So I cheat by searching for a subdirectory under it.

You can also find the appdata directory by looking at the environment 
variable USERPROFILE, switching to that directory, and descending 
directly into "application data" by using the tab key.

C:\>set USERPROFILE
USERPROFILE=C:\Documents and Settings\davea

C:\>cd "Documents and Settings\davea"

C:\Documents and Settings\davea>cd "Application Data"

I got the last line by typing    cd app   then pressing the tab key 
(this adds the quotes and spaces for me)

Anyway, once you're in the Firefox directory, do:

C:\Documents and Settings\davea\Application Data\Mozilla\Firefox>dir /s 
cook*

and you'll see the actual file.

You can also search for it from the root, but I have 13 files 
cookies.*   and 8  cookies.sqlite

Incidentally, lots of interesting stuff is in the USERPROFILE directory, 
so it's a good thing to know how to quickly find.  Different versions of 
Windows put it different places, but it ends with the logged-in user 
name.  So user-specific data is typically stored there.  Some versions 
of Python even include a directory under it in the sys.path directory list.

DaveA




More information about the Python-list mailing list