Hello stranger.
So I'm assuming you lurking here in the same situation as I was - trying to find out a way to backup or port your one time tokens from iOS app.
Thanks to the clues left by @Esgariot in #412 I was able to figure the process out. I'm not going to go into too many details for each step, if something doesn't make sense you'll have to google it.
- Make an encrypted backup keeping note of the password you set
- Run
go install github.com/dunhamsteve/ios/cmd/irestore@latest. Install golang first if you don't have it.
- Run
irestore it should display a list with your backup like iphone 00000000-0000000000000000
- Run
irestore 00000000-0000000000000000 dumpkeys keys.json entering the password from step1
- Run this python script. Obviously you'll need python installed.
#!/usr/bin/env python3
import json
from base64 import b64decode, b32encode
with open('keys.json') as file:
j = json.load(file)
for c in j['General']:
if 'svce' in c and c['svce'] == 'me.mattrubin.onetimepassword.token':
url = b64decode(c['gena']).decode('utf-8')
secret = b32encode(b64decode(c['v_Data'])).decode('utf-8')
print("{0}&secret={1}".format(url, secret))
The script will print a bunch of URLs in the form of otpauth://totp/... complete with secrets.
You can now open them in Safari one by one to add to iOS or OSX built-in keychain which now has code generator integrated. Or use just a secret string to import items into your other token app.
Hello stranger.
So I'm assuming you lurking here in the same situation as I was - trying to find out a way to backup or port your one time tokens from iOS app.
Thanks to the clues left by @Esgariot in #412 I was able to figure the process out. I'm not going to go into too many details for each step, if something doesn't make sense you'll have to google it.
go install github.com/dunhamsteve/ios/cmd/irestore@latest. Install golang first if you don't have it.irestoreit should display a list with your backup likeiphone 00000000-0000000000000000irestore 00000000-0000000000000000 dumpkeys keys.jsonentering the password from step1The script will print a bunch of URLs in the form of
otpauth://totp/...complete with secrets.You can now open them in Safari one by one to add to iOS or OSX built-in keychain which now has code generator integrated. Or use just a secret string to import items into your other token app.