• Stars
    star
    381
  • Rank 112,502 (Top 3 %)
  • Language
    Python
  • License
    MIT License
  • Created over 6 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Import and Export passwords for Firefox Quantum 🔑

PyPI version Downloads

ffpass - Import and Export passwords for Firefox Quantum

The latest version of Firefox doesn't allow to import or export the stored logins and passwords as a file.

This tools interacts with the encrypted password database of Firefox to provide these features.

Installation

ffpass requires Python 3.6+ and will work with Firefox 58+

pip install ffpass

Features

  • Supports master passwords
  • Automatic profile selection for Linux, macOS and Windows
  • Export to CSV
  • Import from CSV compatible with Google Chrome

Note: Firefox must be closed during the whole process, as these actions change its database.

Note: If you have Sync enabled, you'll have to disconnect and reconnect your Firefox account after importing the passwords.

Export to CSV

ffpass export > passwords.csv
ffpass export -f passwords.csv
ffpass export --file passwords.csv

Usage

usage: ffpass export [-h] [-t TO_FILE] [-d DIRECTORY] [-v]

outputs a CSV with header `url,username,password`

optional arguments:
  -h, --help            show this help message and exit
  -f FILE, --file FILE  file to export password (defaults to stdout)
  -d DIRECTORY, --directory DIRECTORY, --dir DIRECTORY
                        Firefox profile directory
  -v, --verbose

Import from CSV

ffpass import < passwords.csv
ffpass import -f passwords.csv
ffpass import --file passwords.csv

By default, it works with the passwords exported from Google Chrome.

Usage

usage: ffpass import [-h] [-f FROM_FILE] [-d DIRECTORY] [-v]

imports a CSV with columns `url,username,password` (order insensitive)

optional arguments:
  -h, --help            show this help message and exit
  -f FILE, --file FILE  file to import from (defaults to stdin)
  -d DIRECTORY, --directory DIRECTORY, --dir DIRECTORY
                        [Firefox profile directory](https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data#w_how-do-i-find-my-profile)
  -v, --verbose

Formatting

For CSV files not exported from Google Chrome, take these formatting rules into consideration:

1. The CSV must have the headers "url", "username", and "password". Any other columns will be safely ignored.
2. The url must be formatted to include all prefixes ("http://", "https://", etc), or ffpass will not be able to read them correctly.
3. ffpass does not care if the CSV has quotes around fields, even if some fields have them and others don't.

Transfer from Google Chrome to Firefox

Now, Firefox can more accurately import logins saved in Chrome/Chromium on Windows and macOS (including timestamps, deduping, http auth. logins, etc.) so you don't need to use this tool on those operating systems. See File > Import from Another Browser… in Firefox to import.

Export from Google Chrome

  1. Open Chrome and enter the following in the address bar: chrome://flags/#PasswordExport
  2. Click Default next to “Password export” and choose Enabled.
  3. Click Relaunch Now. Chrome will restart.
  4. Click the Chrome menu in the toolbar and choose Settings.
  5. Scroll to the bottom and click Advanced.
  6. Scroll to the “Passwords and forms” section and click “Manage passwords”.
  7. Click next to Saved Passwords and choose Export.
  8. Click Export Passwords, enter the password you use to log in to your computer, and save the file to passwords.csv (or any other available name).

(instructions from https://support.1password.com/import-chrome/)

Import in Firefox

  1. Stop Firefox
  2. Import into Firefox:
ffpass import --file passwords.csv

Restart Firefox, making sure it didn't leave any process still open.

Transfer from Firefox to Google Chrome

Export from Firefox

  1. Stop Firefox
  2. Export from Firefox:
ffpass export --file passwords.csv

Import in Google Chrome

  1. Open Chrome and enter the following in the address bar: chrome://flags/#PasswordImport
  2. Click Default next to “Password import” and choose Enabled.
  3. Click Relaunch Now. Chrome will restart.
  4. Click the Chrome menu in the toolbar and choose Settings.
  5. Scroll to the bottom and click Advanced.
  6. Scroll to the “Passwords and forms” section and click “Manage passwords”.
  7. Click next to Saved Passwords and choose Import.
  8. Select the file passwords.csv and click Import.

Troubleshoot

  • ffpass export: error: the following arguments are required: -d/--directory/--dir

    It means one of the following (launch with option --verbose to know):

    • Automatic profile selection is not supported for your platform.
    • There is more than one user profile for Firefox.

    You have to provide the --dir option with your Firefox Profile Folder. To find it, follow these instructions on the website of Firefox.

  • Firefox password database is empty. Please create it from Firefox.

    It means that Firefox currently doens't store any password. ffpass cannot create the password database for security reasons. Just add one password manually to Firefox to create the database.

  • TypeError: 'PosixPath' object is not iterable

    See #17.

  • Empty url field ("example.com") in Firefox after importing: the urls of the source csv file must begin with a scheme (http://, https://, ftp://, etc…)

  • Passwords do not sync to other devices, including Lockwise app.

    Importing passwords break the sync. You'll have to disconnect the Firefox account in the Sync options and the re-add it.

Credits

Thanks a lot to @lclevy for the retro-engineering! I was inspired by his repository https://github.com/lclevy/firepwd.

More Repositories

1

algnuth

Algebraic Number Theory package
Python
272
star
2

har2requests

Generate Python Requests code from your browser activity 🤖
Python
100
star
3

fastnode2vec

Fast and scalable node2vec implementation
Python
86
star
4

LaBot

Bot Dofus 2 en Python 3
Python
79
star
5

copypasta-data

For anyone who would need copypasta data.
Python
69
star
6

pydivsufsort

Python package for string algorithms ➰
Python
32
star
7

tqdm_joblib

Python
26
star
8

domical

In-browser OCaml notebooks 🐪
OCaml
25
star
9

fritm

Cross-platform network reverse engineering framework written in Python 🌐
Python
25
star
10

llama-runpod

Run llama.cpp on RunPod
Dockerfile
20
star
11

mcSATan

A diabolic implementation of mcSAT 😈
Python
11
star
12

litterboxed

Open-source implementation of Letter Boxed
Svelte
10
star
13

my_markdown_resume

Write a decent-looking resume in 5 minutes without knowing LaTeX!
TeX
10
star
14

geopt

Generic Optimization by Genetically Evolved Operation Trees
Python
9
star
15

beep

A cross-platform (Windows, MacOS, Linux) implementation of beep
C
9
star
16

MarsRover

AI controlling a Mars Rover
Python
8
star
17

tomaster

Topological Mode Analysis on Steroids
Python
8
star
18

hash-crypto

Hash-based signatures
Python
6
star
19

DofLog

Python
5
star
20

ubuf

Generate protocols for C++ and JS
Python
5
star
21

matchmaker

Iterate over the solutions to a linear sum assignment problem 👥
Python
5
star
22

cfrgame

TeX
4
star
23

kakuro.py

Python
4
star
24

paybybot

Notifications for https://www.paybyphone.fr/
Python
3
star
25

licheat

No more blunders on Lichess
JavaScript
3
star
26

mdp-numba

Simple JIT-compiled implementation of Markov Decision Processes
Python
3
star
27

paybybot2

CLI interface for https://www.paybyphone.fr/
Python
3
star
28

cabret

Various utilities for making bots.
Python
3
star
29

cage

C++ Algorithms for Genetic Evolution
C++
2
star
30

secret-nft

Verifiable encryption in Python and Solidity, using ECC and ZKP
Python
2
star
31

what-the-midi

Work in progress
Python
2
star
32

gpufactor

Factorization algorithms running on GPU
2
star
33

penta.py

Python
2
star
34

chessviz

Visualize chess games ♟️
HTML
2
star
35

INF421-project

Group project for the class "Design and Analysis of Algorithms"
Python
2
star
36

docsend-dl

JavaScript
2
star
37

eloh

Send files via hole-punching
Python
2
star
38

duval

Lyndon factorization and smallest rotation 🪢
C++
2
star
39

5BX

Simple app for 5BX
HTML
2
star
40

robot-judge

HTML
1
star
41

e-HealthWorld-2019

talk given on March 26th
PostScript
1
star
42

meingag

Display 9gag posts
Python
1
star
43

pytorch-aarch64

1
star
44

SlitherBot

Bot for slither.io
JavaScript
1
star
45

test

1
star
46

nbconvert_jekyll

Cool features for Jupyter Notebooks with Jekyll
Smarty
1
star
47

ESC-2019

talk given on September 1st at ESC Congress
PostScript
1
star
48

feaml

Jupyter Notebook
1
star
49

pyTIon

Some Python programs to interact with "old" Texas Instrument calculators.
Python
1
star
50

bm2html.py

Export your bookmarks to a html page with a CSS-free treeview.
Python
1
star
51

interval_map.hpp

C++
1
star
52

seguid

SEGUID checksum calculator for biological sequences
HTML
1
star
53

malib

Python
1
star