ChromeCSV: Exporter for passwords from Chrome to CSV.

29 Jan 2014

tags: featured, code, golang, chrome, passwords, csv

So recently, Fluidblue, a friend of mine, officially released PassDeposit. PassDeposit is a high-security online password manager with a beautiful interface. If you’re interested in the inner workings, check out the code!

It also has a CSV import option, so I thought I’d make an exporter for your passwords from Google Chrome or Chromium to use it.
Without further ado – Here it is!


Download v0.1 for Windows Download v0.1 for Linux Show the Code

ChromeCSV

ChromeCSV is a simple tool for exporting the passwords you saved in Google Chrome / Chromium to a plain text CSV file. You can then import the contents of that file into your PassDeposit account or do whatever you like to it!

Features

Usage

No need to Compile or Install! Simply grab the latest release from here: Downloads & Releases

First, close all Chrome windows. Yes, all of them. Even this one. Then, open a console where you downloaded it and type the following, then hit Enter.

# on linux
chromecsv ~/.config/google-chrome/
:: on windows
chromecsv "%LOCALAPPDATA%\Google\Chrome\User Data"

If you don’t want to memorize the path, you can open the console and type the command, then close Chrome and then press Enter.

Now, you should have a new file named passwords.csv. Open it (when noone is around :smile:) and cheer in happiness!

Compiling from Source

You’ll need a working Go environment and libsqlite3-dev.

On Ubuntu, for example, you can get that up and running like this:

sudo apt-get install libsqlite3-dev golang

Now for the fun part:

go get github.com/mattn/go-sqlite3 # get sqlite3-bindings for golang
go get github.com/cfstras/chromecsv # get and install chromecsv

Details

Chrome saves login data into an SQLite3 database called Login Data, which is stored in your %LOCALAPPDATA%\Google\Chrome\User Data\Default\ (on Windows) or ~/.config/google-chrome/Default/.

On Windows, the passwords are encrypted through the CryptProtectData WinApi function, which derives a key from your logon credentials so only you can decrypt it again. ChromeCSV then uses CryptUnprotectData to get back your passwords. (Ironically, the documentation uses the word typically whenever explaining who in particular can decrypt the data.)

On Linux, per Default, no encryption/decryption is done, so no decryption is necessary. (See this ticket or this fun comment in the code.) You can force it to use Gnome Wallet or KDEWallet with a command-line flag, but this won’t migrate your data.

License

This software is released under the MIT license. For details, see LICENSE.md


Some possibly related posts: