1
0
mirror of https://github.com/sairson/Yasso.git synced 2026-06-17 07:38:13 +08:00

修复ping函数执行问题,增加switch中的default参数,修改日志名为固定的Yasso.log

This commit is contained in:
sairson
2022-01-09 14:42:26 +08:00
parent db63f152dd
commit 9ef5cac578
3 changed files with 5 additions and 3 deletions

View File

@@ -34,6 +34,9 @@ func init() {
}
func allRun(hostString string, portString string, log bool, runtime int, noping bool) {
defer func() {
fmt.Println("[Yasso] scan task is completed")
}()
var (
ips []string
ports []int
@@ -124,5 +127,4 @@ func allRun(hostString string, portString string, log bool, runtime int, noping
fmt.Println("----- [Yasso] Start do web service scan -----")
DisMapScan(alive, webports)
}
fmt.Println("[Yasso] scan task is completed")
}

View File

@@ -15,7 +15,7 @@ func Println(s string) {
fmt.Println("[!] open log file failed", err)
return
}
file.WriteString("\n" + s)
_, _ = file.WriteString("\n" + s)
}
func CreateLogFile(filename string) {

View File

@@ -5,7 +5,7 @@ import (
)
func init() {
cmd.CreateLogFile("result.txt")
cmd.CreateLogFile("Yasso.log")
}
func main() {