QSCTech / zjunet

Command Line Scripts for ZJU (VPN / WLAN / DNS)
GNU General Public License v3.0
302 stars 48 forks source link

disabled password echoing #60

Closed yejingchen closed 7 years ago

yejingchen commented 7 years ago

Password echoing is an embarrassing thing... Added read ...-spassword.

zenozeng commented 7 years ago

@yejingchen 我仿佛记得以前哪个 openwrt 的版本上会没有 -s 的支持。不知道现在怎么样了。要是之后遇到了再好了。

zenozeng commented 7 years ago

@Senorsen 森森你 release 一下吧

Senorsen commented 7 years ago

Done.

Senorsen commented 7 years ago

Also updated https://dl.zjuqsc.com/linux/ repos.

Senorsen commented 7 years ago

Maybe someone else should take over this work. =)

wfwf1997 commented 7 years ago

这个好坑的,Ubuntu 16.10 也没有。前几天在室友的电脑上装了 Ubuntu 之后想拨号结果还手动改了代码……

Senorsen commented 7 years ago

http://stackoverflow.com/a/3980904 Use bash in shebang?

yejingchen commented 7 years ago

在 wsl 上测试了一下 bash 的 read -s 是可以正常工作的,而 dash 不能。鉴于稳定版 win10 wsl 还是 Ubuntu 14.04,这个问题应该是由于脚本还在使用 /bin/sh 而 Ubuntu 上 sh 默认软链到 dash 导致的。我建议把脚本全部切换到 bash,并明确指出我们依赖 bash(但是这样我们就不 POSIX了),或者我们可以在读取密码之前 stty(不推荐

2017年3月23日 11:09,"wfwf1997" notifications@github.com写道:

这个好坑的,Ubuntu 16.10 也没有。前几天在室友的电脑上装了 Ubuntu 之后想拨号结果还手动改了代码……

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/QSCTech/zjunet/pull/60#issuecomment-288604867, or mute the thread https://github.com/notifications/unsubscribe-auth/AE4e8GHy8-zm7osBzXf6ivUkF-MGJXRyks5roeJZgaJpZM4MfOLU .