fscan/Plugins/services/kafka/exploiter.go

36 lines
927 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package kafka
import (
"context"
"github.com/shadow1ng/fscan/common"
"github.com/shadow1ng/fscan/plugins/base"
)
// KafkaExploiter Kafka利用器实现 - 最小化版本,不提供利用功能
type KafkaExploiter struct {
*base.BaseExploiter
}
// NewKafkaExploiter 创建Kafka利用器
func NewKafkaExploiter() *KafkaExploiter {
exploiter := &KafkaExploiter{
BaseExploiter: base.NewBaseExploiter("kafka"),
}
// Kafka插件不提供利用功能
exploiter.setupExploitMethods()
return exploiter
}
// setupExploitMethods 设置利用方法
func (e *KafkaExploiter) setupExploitMethods() {
// Kafka插件不提供利用功能仅进行弱密码扫描和未授权访问检测
}
// Exploit 利用接口实现 - 空实现
func (e *KafkaExploiter) Exploit(ctx context.Context, info *common.HostInfo, creds *base.Credential) (*base.ExploitResult, error) {
// Kafka插件不提供利用功能
return nil, nil
}