Here’s a little script I wrote to export Firefox cookies in standard text format:
#!/usr/bin/env bash # Export Firefox cookies to stdout in Netscape CookieJar text format # The output is suitable for use in Python's MozillaCookieJar # See # http://www.cafewebmaster.com/howto-readexport-firefox-cookies-linux # This file is released under GPL3 # Author: Mark Carter mcturra2000@yahoo.co.uk # requires sqlite3 # determine Firefox cookie file DIR=`ls -1dt ~/.mozilla/firefox/*.default | head -1` CFILE=$DIR/cookies.sqlite echo "# Netscape HTTP Cookie File # http://www.netscape.com/newsref/std/cookie_spec.html " sqlite3 $CFILE <<EOF .separator \t --.output cookies.txt select host, 'FALSE' as flag, path, case when isSecure > 0 then 'TRUE' else 'FALSE' end as secure, expiry, name, value from moz_cookies; EOF