I recently started a new job, and have been very busy. But I finally found the time to finish a little side project.

My passwords in Firefox are not synchronized between my laptop and my desktop. Therefore I sometimes have to access passwords on my desktop from my laptop when I’m not home. While Firefox can displays stored passwords, this is not that simple when connected remotely with SSH.

Firefox stores passwords encrypted in a JSON file, logins.json, at the root of the profile. I wrote a small Ruby script to extract and decrypt them. It finds the right profile in profiles.ini, parse the login file, and decrypts username and password fields using NSS.

I ended up rewriting the script as a gem, and released it as firefox-data. The code source is available on GitHub.

Now I really like to improve the gem and add support for bookmarks and history. I’ll make sure to post here if and when I get it done.