Wednesday, July 2, 2008

Firefox 3 cookies.sqlite to Firefox 2 cookies.txt






If you want to convert firefox 3's cookies from the new extension .sqlite to old readable format .txt file, you have to follow those simple steps:

1) Download this script written in python
2) Download ActiveState Python 2.5.2.2 for you OS and install it.

3) Download and install pysqlite module

3) Launch from your shell or command's prompt having your basedir where you downloaded cookies-sql2txt file:

cookies-sql2txt ~/.mozilla/*/cookies.sqlite DomainName >> out.txt

Domain name will be the domain that you looked for instead the command ">> 0ut.txt" writes all results in a out.txt file.






Img credits michaelmuggler


7 comments:

Anonymous said...

WTF? All that messing about and giving up a weeks sex??? Nah, I would rather use FF3 then and keep the pussy :)

Anonymous said...

For all domain, use %:

script.py cookies.sqlite % > sqlite.txt

Just for log, not an iq burn :)

r00t said...

Thx Anonymous for your suggestion. I explained the procedure to log only a certain domain's cookies. But your solution is more fast to log them all.

c u soon.

Anonymous said...

Thanks for the script. Seems to work.

Anonymous said...

If you have sqlite3 on your system (Mac OS X and Linux computers do by default) then you can just type this in the appropriate folder:

sqlite3 -separator ' ' cookies.sqlite 'select * from moz_cookies' > cookies.txt

(That's a tab-space in the quotes after -separator. If you need to type a tab-space on the command line, type a ctrl-v first.)

You can also use sqlite3 to edit and selectively delete cookies if you know a little bit of SQL.

Anonymous said...

I am trying to use the script but get operational error: unable to open database when i enter

python cookies-sql2txt.py filepath % >>out.txt

Anonymous said...

I have the same problem with the script. This is my command:

cookies-sql2txt ~/.mozilla/*/cookies.sqlite % >> out.txt

This gives me the error:
pysqlite2._sqlite.OperationalError: unable to open database file

Any suggestions?