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

推荐订阅源

W
WeLiveSecurity
T
Tenable Blog
Project Zero
Project Zero
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Exploit Database - CXSecurity.com
P
Palo Alto Networks Blog
S
Schneier on Security
Scott Helme
Scott Helme
S
Securelist
Know Your Adversary
Know Your Adversary
Vercel News
Vercel News
IT之家
IT之家
V
V2EX
F
Fortinet All Blogs
Simon Willison's Weblog
Simon Willison's Weblog
K
Kaspersky official blog
博客园_首页
T
Tailwind CSS Blog
The GitHub Blog
The GitHub Blog
Spread Privacy
Spread Privacy
Microsoft Security Blog
Microsoft Security Blog
Cisco Talos Blog
Cisco Talos Blog
The Register - Security
The Register - Security
有赞技术团队
有赞技术团队
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
The Hacker News
The Hacker News
L
LINUX DO - 热门话题
Hugging Face - Blog
Hugging Face - Blog
博客园 - 三生石上(FineUI控件)
A
Arctic Wolf
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
CXSECURITY Database RSS Feed - CXSecurity.com
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Threat Research - Cisco Blogs
P
Proofpoint News Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Privacy & Cybersecurity Law Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
CERT Recently Published Vulnerability Notes
S
SegmentFault 最新的问题
AWS News Blog
AWS News Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
罗磊的独立博客
Apple Machine Learning Research
Apple Machine Learning Research
P
Proofpoint News Feed
The Cloudflare Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Vulnerabilities – Threatpost

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 验证器中即可。