项目作者: dim13

项目描述 :
Google Authenticator migration decoder
高级语言: Go
项目地址: git://github.com/dim13/otpauth.git
创建时间: 2020-06-03T01:23:58Z
项目社区:https://github.com/dim13/otpauth

开源协议:ISC License

下载


Google Authenticator migration decoder

Logo

Convert Google Authenticator otpauth-migration://offline?data=...
transfer links
to plain otpauth links.

Usage

  • Navigate to ⋮ → Transfer accounts → Export accounts.
  • Extract migration link from QR-code using your preferred software.
  • Pass link to otpauth tool.

Flags

  1. -dump
  2. dump as prototext
  3. -eval
  4. evaluate otps
  5. -http string
  6. serve http (e.g. localhost:6060)
  7. -info
  8. display batch info
  9. -link string
  10. migration link (required)
  11. -qr
  12. generate QR-codes (optauth://)
  13. -rev
  14. reverse QR-code (otpauth-migration://)
  15. -workdir string
  16. working directory

Example

  1. go install github.com/dim13/otpauth@latest

Or get latest binary release.

Usage

  1. ~/go/bin/otpauth -link "otpauth-migration://offline?data=CjEKCkhlbGxvId6tvu8SGEV4YW1wbGU6YWxpY2VAZ29vZ2xlLmNvbRoHRXhhbXBsZTAC"

Will output:

  1. otpauth://totp/Example:alice@google.com?issuer=Example&secret=JBSWY3DPEHPK3PXP

QR-Codes

  1. ~/go/bin/otpauth -qr -link "otpauth-migration://offline?data=CjEKCkhlbGxvId6tvu8SGEV4YW1wbGU6YWxpY2VAZ29vZ2xlLmNvbRoHRXhhbXBsZTAC"
  2. # view and scan *.png in current working directory

Will generate:

Example

Serve http

  1. ~/go/bin/otpauth -http=localhost:6060 -link "otpauth-migration://offline?data=CjEKCkhlbGxvId6tvu8SGEV4YW1wbGU6YWxpY2VAZ29vZ2xlLmNvbRoHRXhhbXBsZTAC"

Navigate to http://localhost:6060/

Docker

A Docker container can also be used to run the application by building and running the image as following

Build image

From the current directory run

  1. docker build . -t otpauth:latest

Run container

To start a container from the previously created image run

  1. docker run --name otpauth -p 6060:6060 -v $(pwd)/workdir:/app/workdir --rm otpauth:latest -workdir /app/workdir -http :6060 -link "otpauth-migration://offline?data=CjEKCkhlbGxvId6tvu8SGEV4YW1wbGU6YWxpY2VAZ29vZ2xlLmNvbRoHRXhhbXBsZTAC"
  1. -p 6060:6060
  2. Map the host 6060 to the containr 6060
  3. -v $(pwd)/workdir:/app/workdir
  4. Map the host dir to the containr dir

Navigate to http://localhost:6060/

Other projects

See also https://github.com/dim13/2fa for simple CLI 2FA evaluator