Skip to content

Instantly share code, notes, and snippets.

@marcellmars
Created October 24, 2017 02:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcellmars/a71d2d897c37f06e568f43997b3bf2ab to your computer and use it in GitHub Desktop.
Save marcellmars/a71d2d897c37f06e568f43997b3bf2ab to your computer and use it in GitHub Desktop.
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
Copy link
Author

  • 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