2 Star 3 Fork 2

Janbar / sshdTwoVerification

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
sendmail.sh 371 Bytes
一键复制 编辑 原始数据 按行查看 历史
janbar 提交于 2020-11-15 16:42 . 增加使用邮箱验证码登录方式
#!/bin/bash
login=0
for i in `seq 3`; do
code=$(awk 'BEGIN{srand();printf("%06d",1000000*rand())}')
/janbar/sbin/sendmail /janbar/etc/sendmail.json "$code"
if ! read -t 60 -s -p 'code: ' inputCode ;then
exit 0
fi
echo
if [ "$inputCode" = "$code" ];then
login=1; break
fi
echo -e 'Login incorrect\n'
done
if [ $login -eq 1 ];then
/bin/bash
fi
C
1
https://gitee.com/janbar/sshdTwoVerification.git
git@gitee.com:janbar/sshdTwoVerification.git
janbar
sshdTwoVerification
sshdTwoVerification
master

搜索帮助