v2.6.2
This commit is contained in:
心隨緣動 2025-07-13 01:49:02 +08:00 committed by GitHub
parent 5fcb9cce86
commit b70684e455
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

16
main.go
View File

@ -190,18 +190,24 @@ func showSetting(show bool) {
fmt.Println(Green + "Current panel settings as follows (当前面板设置如下):" + Reset)
fmt.Println("")
if certFile == "" || keyFile == "" {
fmt.Println(Red + "警告面板未安装证书进行SSL保护" + Reset)
fmt.Println(Red + "------>> 警告面板未安装证书进行SSL保护" + Reset)
} else {
fmt.Println(Green + "面板已安装证书采用SSL保护" + Reset)
fmt.Println(Green + "------>> 面板已安装证书采用SSL保护" + Reset)
}
fmt.Println("")
hasDefaultCredential := func() bool {
return userModel.Username == "admin" && crypto.CheckPasswordHash(userModel.Password, "admin")
}()
fmt.Println(Green + fmt.Sprintf("hasDefaultCredential默认凭证: %s", hasDefaultCredential) + Reset)
if hasDefaultCredential == true {
fmt.Println(Red + "------>> 警告使用了默认的admin账号/密码,容易被扫描" + Reset)
} else {
fmt.Println(Green + "------>> 为非默认admin账号/密码,请牢记" + Reset)
}
fmt.Println("")
fmt.Println(Green + fmt.Sprintf("port端口号: %d", port) + Reset)
fmt.Println(Green + fmt.Sprintf("webBasePath访问路径: %s", webBasePath) + Reset)
fmt.Println(Green + "PS为安全起见不显示账号和密码" + Reset)
fmt.Println(Green + "若您已经忘记账号/密码请用脚本选项6重新设置" + Reset)
fmt.Println("")
fmt.Println("--------------------------------------------------")