package services import ( "context" "fmt" "github.com/shadow1ng/fscan/common" ) type OraclePlugin struct { name string ports []int } func NewOraclePlugin() *OraclePlugin { return &OraclePlugin{ name: "oracle", ports: []int{1521, 1522, 1525}, } } func (p *OraclePlugin) GetName() string { return p.name } func (p *OraclePlugin) GetPorts() []int { return p.ports } func (p *OraclePlugin) Scan(ctx context.Context, info *common.HostInfo) *ScanResult { if common.DisableBrute { return p.identifyService(ctx, info) } return &ScanResult{ Success: false, Service: "oracle", Error: fmt.Errorf("Oracle驱动未安装"), } } func (p *OraclePlugin) identifyService(ctx context.Context, info *common.HostInfo) *ScanResult { return &ScanResult{ Success: false, Service: "oracle", Error: fmt.Errorf("Oracle驱动未安装"), } } func init() { RegisterPlugin("oracle", func() Plugin { return NewOraclePlugin() }) }