1 Star 0 Fork 0

Thoughtworks / google-authenticator-extractor

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

Google Authenticator Extractor

Build

What and Why

This project aims at providing a single executable program to extract the OTP accounts from the QR code image exported from Google Authenticator, inspired by extract_otp_secret_keys written in Python.

How to use it

Get an image of the QR code

  1. You can open Google Authenticator, tap on the three dots on the top right of the screen and select “Transfer accounts”, and follow the instructions to get the QR code image.
  2. Move the QR code to your laptop. An easy and secure way on Mac OSX is using Photo Booth to take a photo of the QR code and save it to your laptop.

Run the program to extract the accounts

Download the execuable binary from Releases, and run the executable binary with -i option.

For example, download the executable binary google_authenticator_extractor-x86_64-apple-darwin for Mac OSX, and run the following command in terminal:

chmod a+x google_authenticator_extractor-x86_64-apple-darwin
./google_authenticator_extractor-x86_64-apple-darwin -i /path/to/qrcode-image

Note: OSX may prevent it from running with the message “google_authenticator_extractor-x86_64-apple-darwin” cannot be opened because the developer cannot be verified.. You need to go to System Preferences - Security & Privacy - General to allow it.

The output looks like as below:

[{"name":"******","secret":"**********","issuer":"******"},{"name":"*****","secret":"************","issuer":""}]

How to build from source

Rust is the programming language of the project, Install Rust by following the instructions in the official doument.

On Mac OS X

Install protobuf with Homebrew:

brew install protobuf

Build the project

./build.sh

On Ubuntu

Install protobuf with apt-get:

sudo apt-get update
sudo apt-get install -y protobuf-compiler

Build the project:

./build.sh

With Docker

Build the docker image with the Dockerfile:

docker build . -t google_authenticator_extractor

Run the docker image and with command bash, then you'll be in the docker container.

docker run -v ./:/app --rm -it google_authenticator_extractor bash

Cross Compilation

The Github actions defined steps cross compilation, which are running on CI as well. Currently the following cross compilations are supported.

  • Build for x86_64-pc-windows-gnu on Mac OSX.
  • Build for x86_64-unknown-linux-gnu on Mac OSX.
  • Build for x86_64-pc-windows-gnuu on Ubuntu.

Check the Github Workflow for more details.

MIT License Copyright (c) 2021 Yuan Zhang 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.

简介

A command line tool to extract secrets from Google Authenticator's QR code 展开 收起
Rust 等 3 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

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

搜索帮助