Giter VIP home page Giter VIP logo

csv2keychain's Introduction

сsv2keychain

PyPI Python

About

Small command-line tool for adding exported credentials (login/password pairs) from Chrome to the macOS keychain.

Note: As of macOS High Sierra (v10.13) Safari is able to import bookmarks, history and passwords from Chrome and Firefox: https://support.apple.com/guide/safari/import-bookmarks-history-and-passwords-ibrw1015/mac.

The passwords are stored in the (iCloud) keychain. It is therefore not necessary to use csv2keychain for this use case, especially since the tool is not able to import to the iCloud keychain (see #9).

Installing

You can install the package via pip.

$ pip3 install cmdline-csv2keychain

Preparing credentials from Chrome

  1. To use this tool you should manually export credentials from Google Chrome into .csv file. In the browser, switch to chrome://flags/#PasswordExport and enable option #PasswordExport. UPD: seems that last versions of Chrome enables this feature by default. So you can omit this step.

  2. Reload Chrome

  3. Go to chrome://settings/passwords, click Other actions button (three dots, to the right of Saved Passwords text), then click Export and save the .csv file in any convinient location.

How to use

$ csv2keychain [path.csv] [-u] [-s]
  • -u - update existing password for every account in keychain, if any
  • -s - display credentials on the screen during the process

Example

$ csv2keychain ~/Desktop/Chrome\ Passwords.csv -s

Now your Chrome passwords are available for Safari & other apps. :)

csv2keychain's People

Contributors

cubuspl42 avatar nntarasov avatar tyrann0us avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

csv2keychain's Issues

Error when running on Catalina public beta

Hi, I keep getting the following errror:

Traceback (most recent call last):
File "/usr/local/bin/csv2keychain", line 6, in
from csv2keychain.main import main
File "/Library/Python/2.7/site-packages/csv2keychain/main.py", line 6, in
from .csv2keychain import Csv2Keychain
File "/Library/Python/2.7/site-packages/csv2keychain/csv2keychain.py", line 5, in
from urllib.parse import urlparse
ImportError: No module named parse

Mojave 10.14.5: imported username/password doesn't get synced into iCloud

When I ran the csv2keychain against the exported Chrome password, the passwords were imported into my Keychain BUT they were imported inside the "login" keychain.

Results:

  1. I went to Safari => Preferences => Passwords and none of the imported passwords showed up there
  2. none of the imported passwords were synced to my iOS devices

As a test, I manually entered the username and password for a stackexchange.com. I went back to Keychain Access and the stackexchange.com username/password got saved into "iCloud" keychain.

Results:

  1. stackexchange details showed up inside Safari => Preferences => Passwords
  2. username/password was synced to my iOS devices

Incomplete import in Mac OS Catalina

The scrip works on Safari as expected only for a few passwords. Until Safari asks for my user password again. Then it can't find the UI it needs.
Maybe if you place a delay between those Copy and Paste and those Enter on Add.
Or prompt the user for confirmation for every password.
Maybe import .CSV to .keychain. I don't know if that would work with iCloud Keychain.

Not syncing with iCloud

All worked out well with the app, thanks. The only thing is that it is not synced to icloud. It's synced to the keychain "login" and therefor not picked up by the keychain "icloud" or "local". Is there anything I can do to make this work with iCloud?

Can't get this to work

I installed the script, but I can't get it to work. Every time I try I get this:

-bash: csv2keychain: command not found

Any ideas?

Script Error In New Versions of Safari

Your script is awesome, thank you! The recently built-in Safari import of passwords from Chrome does not work properly so I reverted back to your script and I get the error in the below/attached screenshot. Any help would be greatly appreciated. Thanks!
113522610-005e7c00-9570-11eb-878d-825f10729a90

Thank you

Hey @nntarasov,

Just want to say thank you for building this script! Haven't used it yet, and maybe I even won't use it, but it's something I was looking for and I'm glad somebody did it. Too bad Google removed Keychain integration.

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.