mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-07 12:43:31 +08:00
update import
This commit is contained in:
parent
9f99b1571d
commit
468befb0fd
4
go.mod
4
go.mod
@ -35,10 +35,10 @@ require (
|
||||
github.com/tidwall/gjson v1.6.7
|
||||
github.com/ugorji/go v1.2.3 // indirect
|
||||
github.com/yinghau76/go-ascii-art v0.0.0-20190517192627-e7f465a30189
|
||||
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad
|
||||
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad // indirect
|
||||
golang.org/x/net v0.0.0-20201224014010-6772e930b67b // indirect
|
||||
golang.org/x/sys v0.0.0-20210113181707-4bcb84eeeb78 // indirect
|
||||
golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf // indirect
|
||||
golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf
|
||||
golang.org/x/text v0.3.5 // indirect
|
||||
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
||||
|
6
main.go
6
main.go
@ -21,7 +21,7 @@ import (
|
||||
"github.com/Mrs4s/go-cqhttp/server"
|
||||
"github.com/guonaihong/gout"
|
||||
"github.com/tidwall/gjson"
|
||||
"golang.org/x/crypto/ssh/terminal"
|
||||
"golang.org/x/term"
|
||||
|
||||
"github.com/Mrs4s/MiraiGo/binary"
|
||||
"github.com/Mrs4s/MiraiGo/client"
|
||||
@ -231,7 +231,7 @@ func main() {
|
||||
}
|
||||
if conf.EncryptPassword && conf.PasswordEncrypted == "" {
|
||||
log.Infof("密码加密已启用, 请输入Key对密码进行加密: (Enter 提交)")
|
||||
byteKey, _ := terminal.ReadPassword(int(os.Stdin.Fd()))
|
||||
byteKey, _ := term.ReadPassword(int(os.Stdin.Fd()))
|
||||
key := md5.Sum(byteKey)
|
||||
if encrypted := EncryptPwd(conf.Password, key[:]); encrypted != "" {
|
||||
conf.Password = ""
|
||||
@ -255,7 +255,7 @@ func main() {
|
||||
os.Exit(0)
|
||||
}
|
||||
}()
|
||||
byteKey, _ = terminal.ReadPassword(int(os.Stdin.Fd()))
|
||||
byteKey, _ = term.ReadPassword(int(os.Stdin.Fd()))
|
||||
cancel <- struct{}{}
|
||||
} else {
|
||||
log.Infof("密码加密已启用, 使用运行时传递的参数进行解密,按 Ctrl+C 取消.")
|
||||
|
Loading…
x
Reference in New Issue
Block a user