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

问题修复: - 将'开始扫描'消息从LogSuccess改为LogDebug级别 - 避免在正常输出中显示调试信息干扰用户 - 在debug模式下仍可查看详细扫描进度 用户体验改进: - info级别输出更加干净,只显示实际结果 - 减少无意义的状态消息,专注核心扫描结果 - debug级别保留完整调试信息供开发者使用
52 lines
1016 B
Go
52 lines
1016 B
Go
package web
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
|
|
"github.com/shadow1ng/fscan/common"
|
|
"github.com/shadow1ng/fscan/plugins"
|
|
"github.com/shadow1ng/fscan/webscan"
|
|
)
|
|
|
|
// WebPocPlugin Web漏洞扫描插件
|
|
type WebPocPlugin struct {
|
|
plugins.BasePlugin
|
|
}
|
|
|
|
// NewWebPocPlugin 创建Web POC插件
|
|
func NewWebPocPlugin() *WebPocPlugin {
|
|
return &WebPocPlugin{
|
|
BasePlugin: plugins.NewBasePlugin("webpoc"),
|
|
}
|
|
}
|
|
|
|
|
|
// Scan 执行Web POC扫描
|
|
func (p *WebPocPlugin) Scan(ctx context.Context, info *common.HostInfo) *WebScanResult {
|
|
if common.DisablePocScan {
|
|
return &WebScanResult{
|
|
Success: false,
|
|
Error: fmt.Errorf("POC扫描已禁用"),
|
|
}
|
|
}
|
|
|
|
target := fmt.Sprintf("%s:%s", info.Host, info.Ports)
|
|
common.LogDebug(fmt.Sprintf("WebPOC %s 开始扫描", target))
|
|
|
|
// 直接执行Web扫描
|
|
WebScan.WebScan(info)
|
|
|
|
return &WebScanResult{
|
|
Success: true,
|
|
VulInfo: "WebPOC扫描完成",
|
|
}
|
|
}
|
|
|
|
// init 自动注册插件
|
|
func init() {
|
|
RegisterWebPlugin("webpoc", func() WebPlugin {
|
|
return NewWebPocPlugin()
|
|
})
|
|
}
|