package main import ( "fmt" "os" "github.com/shadow1ng/fscan/common" "github.com/shadow1ng/fscan/core" // 引入本地插件以触发注册 _ "github.com/shadow1ng/fscan/plugins/local/fileinfo" _ "github.com/shadow1ng/fscan/plugins/local/dcinfo" _ "github.com/shadow1ng/fscan/plugins/local/minidump" _ "github.com/shadow1ng/fscan/plugins/local/reverseshell" _ "github.com/shadow1ng/fscan/plugins/local/socks5proxy" ) func main() { var Info common.HostInfo common.Flag(&Info) // 在flag解析后初始化logger,确保LogLevel参数生效 common.InitLogger() // 解析 CLI 参数 if err := common.Parse(&Info); err != nil { os.Exit(1) } // 初始化输出系统,如果失败则直接退出 if err := common.InitOutput(); err != nil { common.LogError(fmt.Sprintf("初始化输出系统失败: %v", err)) os.Exit(1) } defer common.CloseOutput() // 执行 CLI 扫描逻辑 core.RunScan(Info) }