mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-23 03:31:53 +08:00
refactor: 增强 systeminfo 插件并合并 envinfo
- systeminfo 新增网卡信息、权限检测、补丁数量、杀软检测、 防火墙状态、敏感环境变量扫描等功能 - 合并 envinfo 到 systeminfo,删除独立的 envinfo 插件 - 修复本地插件通过 -m 指定时仍需 -h 参数的问题 - 通过回调机制解决 common/plugins 循环依赖
This commit is contained in:
@@ -98,6 +98,24 @@ var (
|
||||
mutex sync.RWMutex
|
||||
)
|
||||
|
||||
func init() {
|
||||
common.IsLocalMode = func(mode string) bool {
|
||||
if mode == "" || mode == "all" {
|
||||
return false
|
||||
}
|
||||
for _, name := range strings.Split(mode, ",") {
|
||||
name = strings.TrimSpace(name)
|
||||
if name == "" {
|
||||
continue
|
||||
}
|
||||
if !HasType(name, PluginTypeLocal) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
// RegisterWithPorts 注册带端口信息的插件
|
||||
func RegisterWithPorts(name string, factory func() Plugin, ports []int) {
|
||||
RegisterWithTypes(name, factory, ports, []string{PluginTypeService})
|
||||
|
||||
Reference in New Issue
Block a user