Created
November 26, 2021 07:38
-
-
Save kahnwong/e94933bb80888e4b7f75df4d90645cbe to your computer and use it in GitHub Desktop.
aegis_to_tokenvault.py
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 json | |
import os, glob | |
filename = glob.glob("*plain*.json")[0] | |
with open(filename, "r") as f: | |
d = json.loads(f.read()) | |
data = d["db"]["entries"] | |
out = [] | |
for i in data: | |
r = { | |
"service": i["issuer"], | |
"account": i["name"], | |
"secret": i["info"]["secret"], | |
"notes": "", | |
} | |
out.append(r) | |
with open("output.json", "w") as f: | |
json.dump(out, f, indent=4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment