Tag Archive: chromium


cookies.txt for Chromium (linux)

A simple python script to extract all cookies from Chromium and export them to the cookies.txt file:

#!/usr/bin/python
# -*- coding: utf-8 -*-

from sqlite3 import dbapi2 as db
import os

homedir =  os.environ['HOME']
cookie_file = homedir + '/.config/chromium/Default/Cookies'
output_file = homedir + '/cookies.txt'

conn = db.connect(cookie_file)
cur = conn.cursor()
cur.execute('SELECT host_key, path, secure, expires_utc, name, value FROM cookies')

f = open(output_file, 'w')

for row in cur.fetchall():
    f.write("%s\tTRUE\t%s\t%s\t%d\t%s\t" % (row[0], row[1], str(bool(row[2])).upper(), row[3], row[4]))
    # unicode handler
    f.write(row[5].encode('utf-8'))
    f.write("\n")

f.close()
conn.close()

Enjoy ;)

These days I began to develop a new feature to Google Chromium and fix some ones (certain problems in Chromium gets me angry…very angry!!! =P).

I resolved to write this post because in the official build guide there is not mention how to workaround the problem with gcc-4.4 and the WebKit bug (you can see it here).

The problem resides in the file:

$CHROMIUM_ROOT/src/third_party/WebKit/WebCore/WebCore.gyp/webcore.target.mk

If you don’t apply this patch you will see various erroneous lines saying that there are undefined references into file libwebcore.a as these bellow:

undefined reference to findColor
undefined reference to findEntity
undefined reference to findValue

Pay attention: you have to apply the patch after synchronize your code with the remote repository and run the command “gclient runhooks –force” inside $CHROMIUM_ROOT/src or else the changes will be overwritten!

To apply the patch, just do it:

cd $CHROMIUM_ROOT
patch -p0 < /path/to/patch.doc

Some informations:

  • ccache statistics:

  • time compilation:
~  1h56m08s
  • target machine:
2.6.32-gentoo-r4-fx #1 SMP PREEMPT x86_64 Intel(R) Core(TM)2 Duo CPU T5250 @ 1.50GHz
  • tools:
  • gcc 4.4.3 / ccache 2.4

    Extra informations:

    • if you desire compile the code with ccache just change the Makefile inside $CHROMIUM_ROOT/src
    • all object code and binaries are put into directory $CHROMIUM_ROOT/src/out, if you wanna run a “make distclean” just remove this directory…this Makefile (from h3ll) does not have a distclean target!!!

    In the next article I will explain how to compile Google Chromium with LLVM/Clang ;)

    Follow

    Get every new post delivered to your Inbox.