Skip to content

Instantly share code, notes, and snippets.

@GhostOnTheFiber
Created July 30, 2019 11:52
Show Gist options
  • Save GhostOnTheFiber/34c3662cc775ab4e03c4a034fb28af1d to your computer and use it in GitHub Desktop.
Save GhostOnTheFiber/34c3662cc775ab4e03c4a034fb28af1d to your computer and use it in GitHub Desktop.
Simple script to covert andotp backup to gopass otp codes.
import json
import urllib.parse
with open('tokens.json') as f:
d = json.load(f)
for items in d:
types = items['type']
secret = items['secret']
label = urllib.parse.quote_plus(items['label'])
out = "otpauth://totp/"+label+"?secret="+secret
print("totp: " + out)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment