Extract TOTP/HOTP secret keys from Google Authenticator exports
- Install the dependencies:
pip install -r requirements.txt
- Install the Protocol Buffers Compiler (protoc)
- Generate a Python file out of the
.proto
schema:protoc --python_out=. google_auth.proto
- Export your accounts from Google Authenticator
- Screenshot the QR code and decode it
- Pass the URL to the script:
./decodeotp.py "otpauth-migration://offline?data=..."
The output will be in form of otpauth://
URLs, one per line, like this:
otpauth://totp/ACME%20Inc.:John%20Smith?secret=ABCDEFGHIJKLMNOP&issuer=ACME%20Inc.&algorithm=SHA1&digits=6
google_auth.proto
is provided by the Aegis project. All other files contain original code.