自动获取 MFA token

在mac下,下载 oath-toolkit工具

执行

brew install oath-toolkit

 

使用虾米啊命令获取

alias smCode="echo `oathtool --totp -b SECKEY `| pbcopy"
 
 
参考博客: https://www.jianshu.com/p/6d9ceb3bb508
http://t.zoukankan.com/sihye-p-14411197.html
 
因为mac 无法使用except 和swpan,因此使用sshpass
参考下面博客安装一下:
https://blog.csdn.net/qq_41248260/article/details/124927365
posted @ 2022-12-05 17:07  hoey94  阅读(97)  评论(0编辑  收藏  举报