Created
June 13, 2017 01:03
-
-
Save pandada8/c3c0704b2bca558aced00bfe5d230d64 to your computer and use it in GitHub Desktop.
dump pass
This file contains hidden or 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 subprocess | |
import glob | |
import json | |
import os | |
p = {} | |
os.chdir(os.path.expanduser("~/.password-store")) | |
for f in glob.glob("**/*.gpg", recursive=True): | |
name = os.path.splitext(f)[0] | |
print(name) | |
e = subprocess.check_output(["pass", name]) | |
p[name] = e | |
with open("export.json", "w") as fp: | |
json.dump(p, fp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment