Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import passwords from chrome to pass
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)
@marcellmars

This comment has been minimized.

Copy link
Owner Author

@marcellmars 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