refactor: 增强 systeminfo 插件并合并 envinfo

- systeminfo 新增网卡信息、权限检测、补丁数量、杀软检测、
  防火墙状态、敏感环境变量扫描等功能
- 合并 envinfo 到 systeminfo,删除独立的 envinfo 插件
- 修复本地插件通过 -m 指定时仍需 -h 参数的问题
- 通过回调机制解决 common/plugins 循环依赖
This commit is contained in:
ZacharyZcR
2026-05-15 22:47:39 +08:00
parent a0fc7881f2
commit ca4e1ffad3
7 changed files with 277 additions and 292 deletions
+18
View File
@@ -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})