Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zhangyuan/google-authenticator-extractor
A command line tool to extract secrets from Google Authenticator's QR code. 从 Google Authenticator 中导出二次验证密钥的命令行工具
https://github.com/zhangyuan/google-authenticator-extractor
google-authenticator
Last synced: 3 months ago
JSON representation
A command line tool to extract secrets from Google Authenticator's QR code. 从 Google Authenticator 中导出二次验证密钥的命令行工具
- Host: GitHub
- URL: https://github.com/zhangyuan/google-authenticator-extractor
- Owner: zhangyuan
- License: mit
- Created: 2021-02-23T14:43:26.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-05-27T05:27:36.000Z (8 months ago)
- Last Synced: 2024-10-13T04:56:39.021Z (3 months ago)
- Topics: google-authenticator
- Language: Rust
- Homepage:
- Size: 192 KB
- Stars: 9
- Watchers: 3
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Google Authenticator Extractor
[![Build](https://github.com/zhangyuan/google-authenticator-extractor/workflows/Build/badge.svg)](https://github.com/zhangyuan/google-authenticator-extractor/actions/workflows/build.yml)
## What and WhyThis 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](https://github.com/scito/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](https://github.com/zhangyuan/google-authenticator-extractor/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:
```bash
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:
```json
[{"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](https://www.rust-lang.org/tools/install).
### On Mac OS X
Install protobuf with Homebrew:
```bash
brew install protobuf
```Build the project
```bash
./build.sh
```### On Ubuntu
Install protobuf with `apt-get`:
```bash
sudo apt-get update
sudo apt-get install -y protobuf-compiler
```Build the project:
```bash
./build.sh
```### 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](./.github/workflows/build.yml) for more details.