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

- 移动adapters目录到plugins下统一管理 - 删除已迁移的老版本插件文件,避免代码重复 - 更新所有legacy适配器引用,统一使用legacy目录下的源文件 - 新增FindNet插件的legacy适配器,支持135端口RPC扫描 - 修复包导入路径,确保适配器正常工作 - 清理插件目录结构,分离新架构插件和legacy插件
54 lines
1.6 KiB
Go
54 lines
1.6 KiB
Go
package rdp
|
||
|
||
import (
|
||
"github.com/shadow1ng/fscan/plugins/adapters"
|
||
"github.com/shadow1ng/fscan/plugins/base"
|
||
LegacyPlugins "github.com/shadow1ng/fscan/plugins/legacy"
|
||
)
|
||
|
||
// NewRdpPlugin 创建RDP弱密码检测插件
|
||
func NewRdpPlugin() base.Plugin {
|
||
// 插件元数据
|
||
metadata := &base.PluginMetadata{
|
||
Name: "rdp",
|
||
Version: "1.0.0",
|
||
Author: "fscan-team",
|
||
Description: "RDP远程桌面服务弱密码检测",
|
||
Category: "service",
|
||
Ports: []int{3389}, // RDP端口
|
||
Protocols: []string{"tcp"},
|
||
Tags: []string{"rdp", "remote-desktop", "weak-password", "service", "brute-force"},
|
||
}
|
||
|
||
// 适配器选项
|
||
options := &adapters.LegacyPluginOptions{
|
||
CheckBruteFlag: true, // RDP依赖暴力破解标志
|
||
IsVulnPlugin: false, // 这是服务检测插件,不是漏洞检测
|
||
IsInfoPlugin: false, // 主要是弱密码检测
|
||
CustomPorts: []int{3389}, // RDP端口
|
||
}
|
||
|
||
// 创建适配器,直接使用老版本的RdpScan函数
|
||
return adapters.NewLegacyPlugin(metadata, LegacyPlugins.RdpScan, options)
|
||
}
|
||
|
||
// init 自动注册RDP插件
|
||
func init() {
|
||
// 创建插件工厂
|
||
metadata := &base.PluginMetadata{
|
||
Name: "rdp",
|
||
Version: "1.0.0",
|
||
Author: "fscan-team",
|
||
Description: "RDP远程桌面服务弱密码检测",
|
||
Category: "service",
|
||
Ports: []int{3389},
|
||
Protocols: []string{"tcp"},
|
||
Tags: []string{"rdp", "remote-desktop", "weak-password", "service", "brute-force"},
|
||
}
|
||
|
||
factory := base.NewSimplePluginFactory(metadata, func() base.Plugin {
|
||
return NewRdpPlugin()
|
||
})
|
||
|
||
base.GlobalPluginRegistry.Register("rdp", factory)
|
||
} |