package webtitle import ( "github.com/shadow1ng/fscan/plugins/adapters" "github.com/shadow1ng/fscan/plugins/base" LegacyPlugins "github.com/shadow1ng/fscan/plugins/legacy" ) // NewWebTitlePlugin 创建WebTitle网站标题获取插件 func NewWebTitlePlugin() base.Plugin { // 插件元数据 metadata := &base.PluginMetadata{ Name: "webtitle", Version: "1.0.0", Author: "fscan-team", Description: "Web网站标题和指纹识别扫描", Category: "web", Ports: []int{}, // Web插件不限制端口,支持任意端口的URL Protocols: []string{"http", "https"}, Tags: []string{"web", "title", "fingerprint", "information-gathering"}, } // 适配器选项 options := &adapters.LegacyPluginOptions{ CheckBruteFlag: false, // WebTitle不依赖暴力破解标志 IsVulnPlugin: false, // 这不是漏洞检测插件 IsInfoPlugin: true, // 这是信息收集插件 CustomPorts: []int{}, // Web插件不限制端口,支持任意端口的URL } // 创建适配器,使用老版本的WebTitle函数 return adapters.NewLegacyPlugin(metadata, LegacyPlugins.WebTitle, options) } // init 自动注册WebTitle插件 func init() { // 创建插件工厂 metadata := &base.PluginMetadata{ Name: "webtitle", Version: "1.0.0", Author: "fscan-team", Description: "Web网站标题和指纹识别扫描", Category: "web", Ports: []int{}, // Web插件不限制端口,支持任意端口的URL Protocols: []string{"http", "https"}, Tags: []string{"web", "title", "fingerprint", "information-gathering"}, } factory := base.NewSimplePluginFactory(metadata, func() base.Plugin { return NewWebTitlePlugin() }) base.GlobalPluginRegistry.Register("webtitle", factory) }