mirror of
https://github.com/shadow1ng/fscan.git
synced 2025-09-14 14:06:44 +08:00

- 修复FindNet插件分类从information改为service,解决不在服务扫描阶段执行的问题 - 统一所有插件分类为标准的三种类型:service、web、local - 将vulnerability类型插件(smbghost、ms17010)重分类为service - 将information类型插件(netbios、findnet)重分类为service - 确保所有网络服务端口扫描插件都在服务扫描阶段正确执行 - 保持插件功能不变,仅调整分类以符合新架构要求 测试验证:FindNet现已能正确在135端口扫描时显示网络接口信息
54 lines
1.7 KiB
Go
54 lines
1.7 KiB
Go
package findnet
|
||
|
||
import (
|
||
"github.com/shadow1ng/fscan/plugins/adapters"
|
||
"github.com/shadow1ng/fscan/plugins/base"
|
||
LegacyPlugins "github.com/shadow1ng/fscan/plugins/legacy"
|
||
)
|
||
|
||
// NewFindNetPlugin 创建FindNet网络发现插件
|
||
func NewFindNetPlugin() base.Plugin {
|
||
// 插件元数据
|
||
metadata := &base.PluginMetadata{
|
||
Name: "findnet",
|
||
Version: "1.0.0",
|
||
Author: "fscan-team",
|
||
Description: "Windows网络接口发现和主机名解析 (通过RPC)",
|
||
Category: "service",
|
||
Ports: []int{135}, // RPC端口
|
||
Protocols: []string{"tcp"},
|
||
Tags: []string{"findnet", "rpc", "information-gathering", "windows", "network-discovery"},
|
||
}
|
||
|
||
// 适配器选项
|
||
options := &adapters.LegacyPluginOptions{
|
||
CheckBruteFlag: false, // FindNet不依赖暴力破解标志
|
||
IsVulnPlugin: false, // 这不是漏洞检测插件
|
||
IsInfoPlugin: true, // 这是信息收集插件
|
||
CustomPorts: []int{135}, // RPC端口
|
||
}
|
||
|
||
// 创建适配器,直接使用老版本的Findnet函数
|
||
return adapters.NewLegacyPlugin(metadata, LegacyPlugins.Findnet, options)
|
||
}
|
||
|
||
// init 自动注册FindNet插件
|
||
func init() {
|
||
// 创建插件工厂
|
||
metadata := &base.PluginMetadata{
|
||
Name: "findnet",
|
||
Version: "1.0.0",
|
||
Author: "fscan-team",
|
||
Description: "Windows网络接口发现和主机名解析 (通过RPC)",
|
||
Category: "service",
|
||
Ports: []int{135},
|
||
Protocols: []string{"tcp"},
|
||
Tags: []string{"findnet", "rpc", "information-gathering", "windows", "network-discovery"},
|
||
}
|
||
|
||
factory := base.NewSimplePluginFactory(metadata, func() base.Plugin {
|
||
return NewFindNetPlugin()
|
||
})
|
||
|
||
base.GlobalPluginRegistry.Register("findnet", factory)
|
||
} |