Created
October 24, 2017 02:54
-
-
Save marcellmars/a71d2d897c37f06e568f43997b3bf2ab to your computer and use it in GitHub Desktop.
import passwords from chrome to pass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import subprocess | |
def importpass(filepath): | |
with open(filepath) as csvfile: | |
reader = csv.DictReader(csvfile, delimiter=',') | |
for row in reader: | |
try: | |
username = row['username'] | |
password = row['password'] | |
name = row['name'] | |
url = row['url'] | |
p = subprocess.run( | |
'echo "{}\nlogin: {}\nurl: {}" | pass insert -m web/{}'.format(password, | |
username, | |
url, | |
name), | |
shell=True) | |
print(p.returncode, row) | |
except Exception as e: | |
print(e, row) |
Author
marcellmars
commented
Oct 24, 2017
- chrome://flags
- enable Password import and export
- chrome://settings/passwords
- export to .csv
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment