mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-22 03:10:42 +08:00
move plugin safety metadata to registry
This commit is contained in:
@@ -22,3 +22,10 @@ func RegisterWebPlugin(name string, creator func() WebPlugin) {
|
||||
return creator()
|
||||
}, []int{}, []string{plugins.PluginTypeWeb})
|
||||
}
|
||||
|
||||
// RegisterUnsafeWebPlugin 注册需要显式授权的主动Web插件。
|
||||
func RegisterUnsafeWebPlugin(name string, creator func() WebPlugin) {
|
||||
plugins.RegisterUnsafeWithTypes(name, func() plugins.Plugin {
|
||||
return creator()
|
||||
}, []int{}, []string{plugins.PluginTypeWeb})
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ func matchCDNorWAF(fingerprints []string) string {
|
||||
|
||||
// init 自动注册插件
|
||||
func init() {
|
||||
RegisterWebPlugin("webpoc", func() WebPlugin {
|
||||
RegisterUnsafeWebPlugin("webpoc", func() WebPlugin {
|
||||
return NewWebPocPlugin()
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user