Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gotp - Google Authenticator 迁移工具

配合 2fa 命令行工具使用,从 Google Authenticator 导出数据中提取 OTP 密钥。

功能

解码 Google Authenticator 导出的迁移 URI,提取密钥后添加到 2fa 工具中使用。

安装

go install github.com/JeaNile/gotp@latest

或下载 预编译二进制

使用

1. 导出 Google Authenticator 数据

  1. 打开 Google Authenticator 应用
  2. 点击右上角 "..." → "转移账号" → "导出账号"
  3. 使用二维码扫描工具读取二维码内容(格式:otpauth-migration://offline?data=...

2. 解码提取密钥

gotp decode "otpauth-migration://offline?data=..."

输出示例:

======================================================================
找到 1 个账号:
======================================================================

账号 #1:
  名称:     user@example.com
  发行者:   Aliyun
  密钥:     LJRNKYKxxxxxxxxxxxx
  类型:     TOTP
  位数:     6
  当前动态口令: 123456

验证密钥是否正确:

gotp verify LJRNKYKxxxxxxxxxxxx 123456

License

MIT

About

解码 Google Authenticator 导出数据,提取 OTP/TOTP/HOTP 密钥

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages