mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-22 03:10:42 +08:00
refactor: 输出格式重构,去掉所有插件的多线程,因为多线程会导致结果不准确,加入进度条
This commit is contained in:
@@ -1,21 +1,19 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/shadow1ng/fscan/Common"
|
||||
"github.com/shadow1ng/fscan/Core"
|
||||
"os"
|
||||
"time"
|
||||
)
|
||||
|
||||
func main() {
|
||||
Common.InitLogger()
|
||||
defer Common.CloseLogger() // 确保程序退出时关闭日志文件
|
||||
|
||||
start := time.Now()
|
||||
var Info Common.HostInfo
|
||||
Common.Flag(&Info)
|
||||
if err := Common.Parse(&Info); err != nil {
|
||||
os.Exit(1) // 或者其他错误处理
|
||||
os.Exit(1) // 直接退出即可,日志已经同步写入
|
||||
}
|
||||
Core.Scan(Info)
|
||||
fmt.Printf("[*] 扫描结束,耗时: %s\n", time.Since(start))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user