Skip to content

Decode one time password (OTP) secrets from QR codes exported by Google Authenticator.

License

Notifications You must be signed in to change notification settings

Kuingsmile/decodeGoogleOTP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

decodeGoogleOTP

This is a cli tool to decode one time password (OTP) secrets from QR codes exported by Google Authenticator. The exported QR codes can be read as image files and decoded result can be exported to JSON or CSV or saved as QR code images or printed as QR code to terminal.

How to use

Export QR codes from Google Authenticator

  1. Open Google Authenticator app on your phone.
  2. Tap on the three dots in the top right corner.
  3. Tap on "Transfer accounts".
  4. Select the accounts you want to export.
  5. Tap on "Export accounts".
  6. Save the QR codes as images.

Decode QR codes

Download the binary from the release page and run it in your terminal.

$ decodeGoogleOTP -i <input file> -c <csv file path>

Parameters

$ decodeGoogleOTP -h

decodeGoogleOTP is a command line tool to decode Google OTP QR codes. Output can be json, csv, qrcode or plain text.

Usage:
  decodeGoogleOTP [flags]
  decodeGoogleOTP [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  version     Print current version of the application

Flags:
  -c, --csv string      Output in CSV format and specify the output file
  -d, --debug           Enable debug mode
  -h, --help            help for decodeGoogleOTP
  -i, --input string    Input file path
  -j, --json string     Output in JSON format and specify the output file
  -p, --print-qr        Print QR code to terminal
  -q, --qrcode string   Output in QR code image format and specify the output directory
  -s, --silent          Enable silent mode
  -t, --text string     Output url list in plain text format and specify the output file
  -u, --url string      Output in URL format and specify the output file
  -v, --version         Print version information

Use "decodeGoogleOTP [command] --help" for more information about a command.

Examples

Decode QR code and save as JSON

$ decodeGoogleOTP -i <input file> -j <output file>

Decode QR code and save as CSV

$ decodeGoogleOTP -i <input file> -c <output file>

Decode QR code and save as QR code images

$ decodeGoogleOTP -i <input file> -q <output directory>

Decode QR code and print as QR code to terminal

$ decodeGoogleOTP -i <input file> -p

Decode QR code and save as plain text

$ decodeGoogleOTP -i <input file> -t <output file>

Decode QR code and save as URL

$ decodeGoogleOTP -i <input file> -u <output file>

License

This project is open source under the MIT license. Welcome everyone to use and contribute code.

MIT License

Copyright (c) 2024-present Kuingsmile

About

Decode one time password (OTP) secrets from QR codes exported by Google Authenticator.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages