browser icon
You are using an insecure version of your web browser. Please update your browser!
Using an outdated browser makes your computer unsafe. For a safer, faster, more enjoyable user experience, please update your browser today or try a newer browser.

Convert Firefox 3 cookies.sqlite to cookies.txt

Posted by on July 16, 2008

Now at firefox 3 does not user cookies.txt, they are use cookies.sqlite, if you use wget or curl command to download with cookies, may you must convert cookies.sqlite to cookies.txt, just copy and paste this scipt, and the script will be convert your cookies.sqlite to cookies.txt.

#!/usr/bin/python

import sqlite3 as db
import sys

cookiedb = ‘/home/henry/.mozilla/firefox/pj8x7vu3.default/cookies.sqlite’
targetfile = ‘/home/henry/kuki-.txt’

what = sys.argv[1]
connection = db.connect(cookiedb)
cursor = connection.cursor()
contents = “host, path, isSecure, expiry, name, value”

cursor.execute(“SELECT ” +contents+ ” FROM moz_cookies WHERE host LIKE ‘%” +what+ “%'”)

file = open(targetfile, ‘w’)
index = 0
for row in cursor.fetchall():
file.write(“%stTRUEt%st%st%dt%st%sn” % (row[0], row[1],
str(bool(row[2])).upper(), row[3], str(row[4]), str(row[5])))
index += 1

print “Gesucht nach: %s” % what
print “Exportiert: %d” % index

file.close()
connection.close()

save this script as export-firefox-cookies.py and run with command

./export-firefox-cookies.py rapidshare

Source : http://blog.schlunzen.org/2008/06/19/firefox-3-und-cookiestxt/

Comments

comments

One Response to Convert Firefox 3 cookies.sqlite to cookies.txt

  1. kennedia insurance

    Maybe the GREATEST paper that I read this week…

    -Yours truly,
    Clinton

Leave a Reply

Your email address will not be published. Required fields are marked *

:)) :) :D (LOL) :-P (woot) ;-) :-o X-( ;-( :-& (angry) (annoyed) (bye) B-) (cozy) (sick) (: (goodluck) (griltongue) (mmm) (hungry) (music) (tears) (tongue) (unsure) (highfive) (dance) (doh) (brokenheart) (drinking) (girlkiss) (rofl) (money) (rock) (nottalking) (party) (sleeping) (thinking) (bringit) (worship) (applause) 8-) (gym) (heart) (devil) (lmao) (banana_cool) (banana_rock) (evil_grin) (headspin) (heart_beat) (ninja) (haha) (evilsmirk) (bigeyes) (funkydance) (idiot) (lonely) (scenic) (hassle) (panic) (okok) (yahoo) (blush) (fish_hit) (muhaha) (muscle) (taser) (beer) (coffee) (banana_ninja) (goal) (fireworks) (smileydance) (dance_bzz) (rusian)