惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
J
Java Code Geeks
雷峰网
雷峰网
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
V
Vulnerabilities – Threatpost
S
Securelist
The Hacker News
The Hacker News
The Register - Security
The Register - Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
G
Google Developers Blog
Hugging Face - Blog
Hugging Face - Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
M
MIT News - Artificial intelligence
AI
AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The GitHub Blog
The GitHub Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Schneier on Security
Schneier on Security
N
Netflix TechBlog - Medium
T
The Blog of Author Tim Ferriss
Google DeepMind News
Google DeepMind News
Hacker News - Newest:
Hacker News - Newest: "LLM"
H
Hacker News: Front Page
博客园 - 司徒正美
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
B
Blog
Microsoft Azure Blog
Microsoft Azure Blog
大猫的无限游戏
大猫的无限游戏
Security Latest
Security Latest
Engineering at Meta
Engineering at Meta
N
News and Events Feed by Topic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Threat Research - Cisco Blogs
U
Unit 42
V
V2EX
V2EX - 技术
V2EX - 技术
L
LINUX DO - 最新话题
aimingoo的专栏
aimingoo的专栏
Microsoft Security Blog
Microsoft Security Blog
Recorded Future
Recorded Future
P
Privacy & Cybersecurity Law Blog
美团技术团队
小众软件
小众软件
F
Fortinet All Blogs

Linux – 魔帆博客

Git配置:如何优雅的配置多用户并使用 ssh 密钥验证 | 魔帆博客 Git 提示 fatal: unsafe repository is owned by someone else 错误 | 魔帆博客 Linux 报错Certificate verification failed: The certificate is NOT trusted. | 魔帆博客 Fedora 系统升级 32->34 跨版本升级 | 魔帆博客 教程:如何更新安装 docker-compose V2 和使用 docker switch | 魔帆博客 Docker WSL1/2 迁移 Linux 发行版目录 | 魔帆博客 Linux 教程:Linux 初学者必了解的概念 | 魔帆博客 创建支持安全启动(Secure Boot)的 Arch Linux ISO 安装镜像 | 魔帆博客 使用 Aria2 搭建离线下载服务器 | 魔帆博客 【记录】Deepin 桌面无限转圈(风火轮) | 魔帆博客 梅林固件KoolProxy插件崩溃连接ssh卸载指南(北) | 魔帆博客 [Linux] dconf 系统配置编辑器——我的系统我做主 | 魔帆博客 Arch Linux 通过 xdg-mime 设置默认文件管理器解决总是用 Visual Studio Code 打开文件夹的问题 | 魔帆博客
双重验证 Authy 导出所有 TOTP token 和 golang 配置 GOPROXY 解决网络问题 | 魔帆博客
野小新 · 2021-09-26 · via Linux – 魔帆博客

Authy 是一个简单好用的 2FA 验证器,我是因为一个网站只能用 Authy 进行双重验证(两步验证)才下载它的。

使用起来除了必须要一个手机号以外,其他都很满意。

前阵子自己部署了这方面的服务,所以打算把双重验证的密码全部迁移过去(然后趁机水一篇文章)

Authy 导出 ToTP token 的方法目前流行的有两种:

  • 使用 authy 桌面版(chrome)加入js脚本导出
  • 使用第三方编程语言的 authy lib 库

authy 的桌面版本很久之前体验过一次,不太喜欢,又是一个螺母套壳应用(electron)。所以直接用第二个方案。

authy-export

authy-export 是一个应用程序,用的 alexzorin/authy 库(作者自产自销)。

这个程序会把自己注册成一个 authy 设备来获取密钥,然后以特定的格式输出所有密钥,所有源代码都是开放的,可以安心使用。

配置 golang 环境

因为这个软件是 golang 写的,所以需要安装 golang。直接去官方下载就好了,这里就不仔细描述了。

如果你是Windows:

# 1.官网下载安装包

# 2.win10版本新的,用微软官方的包管理器一键安装
winget install --id=GoLang.Go -e 

# 2.有scoop的一键安装
scoop install go

如果你是 Linux,用你发行版的包管理器直接安装。

国内golang 网络问题

谷歌等一些大公司比较穷,交不起服务器等费用,导致谷歌等网站在大陆地区访问非常不理想。因为有必要设定一下 golang 的代理加速拉取代码。

使用方法就是配置 GOPROXY 环境变量。

临时生效:

# Windows
## 微软的 powershell)
$env:GOPROXY = "https://goproxy.io,direct"

## cmd
建议不用 cmd,正经人不用 cmd

# Linux
## sh/bash
export GOPROXY=https://goproxy.io,direct

## fish
set -xg GOPROXY "https://goproxy.io,direct"

永久生效:

go env -w GO111MODULE=on
go env -w GOPROXY="https://goproxy.io,direct"

导出 TOTP token 密钥

建议自己编译,如果太麻烦可以用作者编译好的版本,跳过 go get 这一步直接运行下载的 authy-export 即可。

# legacy
❯ go get github.com/alexzorin/authy/cmd/authy-export

# new requires Go 1.12 or newer
❯ go install github.com/alexzorin/authy/...@latest

打开 shell,运行 authy-export,这里以 Windows 下的 powershell 做为示范:

# 就是运行 GOPATH 目录里的 authy-export。其他shell类似
❯ &"$(go env GOPATH)\bin\authy-export.exe"

运行起来之后,首先是输入手机的电话区号(不需要带 + 号)

然后输入手机号,回车后会先请求已经登录的 Authy 设备来弹出登录提示,如果超时没回应再是手机短信登录。

登录成功后,再输入你之前设定的备份密码 backup password,程序就会输出所有的 token。

选择需要或全部导出到其他 2FA 验证器中即可。