1 Star 0 Fork 0

abu.ok / google-authenticator-exporter

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Google Authenticator secret extractor

Note: This project and I are in no way affiliated with Google.

This lets you decode the URI generated by Google Authenticator.

Example

Guide

Prerequisites:

Getting the secret keys:

  1. Open the Google Authenticator app.
  2. Click Settings (three dots, top right), and Transfer accounts.
  3. Select Export accounts.
  4. Authenticate, if prompted.
  5. Select the accounts you want to export (default is all).
  6. Click Next, and capture a picture of the QR code.
    • Note: Screenshots are disabled by the app. Use your laptop webcam, a digital camera or another phone.
  7. Click Next, and repeat step 6 for all QR codes shown (if you have many accounts).
  8. Decode the QR codes to obtain the otpauth-migration://offline?data=... URI.
  9. Clone/Download this repository.
  10. Run npm install.
  11. For generating json runnpm run start, for generating qr-codes run npm run start:qrcode.
  12. Enter the URI when prompted
  13. If you chose json and you want to save the output, enter y and accounts.json

Use a docker image

Prerequisites:

Build the docker image locally:

docker build . --tag google-authenticator-exporter:0.0.1

Decode an obtained QR code URI:

  1. Run the docker container locally:
docker run -it --rm google-authenticator-exporter:0.0.1
  1. Enter the URI when prompted
  2. Since you haven't mounted a volume, you cannot save the output using the above command, so leave the next questions empty (hit Enter).
  3. The output to json will be printed out to terminal.

References

I found the protobuff code in https://github.com/beemdevelopment/Aegis/pull/406/files. The opensource Google Authenticator does not seem to have this yet (5th May 2020): https://github.com/google/google-authenticator-android/issues/118.

A QR scanner app for Android that works is https://play.google.com/store/apps/details?id=com.google.zxing.client.android.

The Base32 format is specified in https://tools.ietf.org/html/rfc3548. There are multiple ways to implement Base32.

License: MIT, BUT this uses GNU GPL 3 code as a dependency (https://github.com/alexbakker/Aegis/blob/56bde0e19b51568a7050f6cb56085a1bb38c5a9e/app/src/main/proto/google_auth.proto) (https://github.com/alexbakker/Aegis/blob/56bde0e19b51568a7050f6cb56085a1bb38c5a9e/LICENSE)

MIT License Copyright (c) 2020 Kristian Rekstad Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

来自 github.com 的仓库 展开 收起
JavaScript 等 2 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/abuoo/google.authenticator.exporter.git
git@gitee.com:abuoo/google.authenticator.exporter.git
abuoo
google.authenticator.exporter
google-authenticator-exporter
master

搜索帮助