中文 English

[Repost] Method to Export TOTP Tokens from Authy

Published: 2021-02-17
token authy golang export otp totp

Based on Ubuntu 18.04 (regular user), other Linux systems are similar. Golang official website: https://golang.org/ Github repository: https://github.com/alexzorin/authy

Download and Install Golang (Mac System, Using Brew)

brew install go

Download Golang (Ubuntu System)

Since the golang version in the Ubuntu apt repository is 1.10, it cannot run the application used for exporting tokens, so we need to manually download and install the latest version of golang. If you have a lower version of golang already installed, please uninstall it first.

cd ~
wget https://dl.google.com/go/go1.14.linux-amd64.tar.gz
sudo tar -zxvf go1.14.linux-amd64.tar.gz -C /usr/local/bin

You can obtain the latest download link from the golang official website.

Set Environment Variables (Ubuntu System)

export GOPATH=~/go
export GOROOT=/usr/local/bin/go
export GOARCH=amd64
export GOOS=linux
export GOTOOLS=$GOROOT/pkg/tool
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
source /etc/profile

Check Version

go version

Import Repository

#设置代理,请自行修改
export http_proxy=http://192.168.1.180:1081
export https_proxy=http://192.168.1.180:1081
#导入仓库
go get github.com/alexzorin/authy

Due to mainland China network restrictions, you may be unable to download. You can enable http/https proxy, which will not be elaborated here.

Export Token

cd ~/go/src/github.com/alexzorin/authy/cmd/authy-export/
go run authy-export.go

Reference Articles

https://www.jianshu.com/p/5f37bdb6bc72