Skip to content

Instantly share code, notes, and snippets.

@kahnwong
Created November 26, 2021 07:38
Show Gist options
  • Save kahnwong/e94933bb80888e4b7f75df4d90645cbe to your computer and use it in GitHub Desktop.
Save kahnwong/e94933bb80888e4b7f75df4d90645cbe to your computer and use it in GitHub Desktop.
aegis_to_tokenvault.py
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