api

package
v0.1.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitWebRuleManager

func InitWebRuleManager(fingerprintsPath string) (*rule.RuleSet, error)

InitWebRuleManager 初始化Web指纹规则管理器

func NewLimiter added in v0.1.4

func NewLimiter(limit int) types.Limiter

NewLimiter creates a target-level concurrency limiter.

func ReloadWebRules

func ReloadWebRules() error

ReloadWebRules 重新加载Web指纹库规则

func UpdateWebRules

func UpdateWebRules() error

UpdateWebRules 从远程更新Web指纹库规则

Types

type ScannerConfig

type ScannerConfig interface {
	GetOptions() *types.Options
}

ScannerConfig 扫描器配置接口

type XMap

type XMap struct {
	// contains filtered or unexported fields
}

XMap 是核心扫描引擎,负责协调各种扫描器

func New

func New(options *types.Options) (*XMap, error)

New 创建新的XMap实例

func NewWithLimiter added in v0.1.4

func NewWithLimiter(options *types.Options, limiter types.Limiter) (*XMap, error)

NewWithLimiter creates a new XMap instance with a shared concurrency limiter.

func (*XMap) GetOptions

func (x *XMap) GetOptions() *types.Options

GetOptions 获取选项

func (*XMap) ParseTargetsString

func (x *XMap) ParseTargetsString(targetsStr string) ([]*types.ScanTarget, error)

ParseTargetsString 将目标字符串解析为ScanTarget切片

func (*XMap) Scan

func (x *XMap) Scan(ctx context.Context, target *types.ScanTarget) (*types.ScanResult, error)

Scan 扫描单个目标

func (*XMap) ScanWithCallback

func (x *XMap) ScanWithCallback(ctx context.Context, targets input.Provider, callback func(*types.ScanResult)) error

ScanWithCallback 使用回调函数扫描多个目标 每完成一个目标的扫描就调用回调函数,适用于需要实时处理结果的场景

func (*XMap) ScanWithCallbackWithLimiter added in v0.1.4

func (x *XMap) ScanWithCallbackWithLimiter(ctx context.Context, targets input.Provider, callback func(*types.ScanResult), limiter types.Limiter) error

ScanWithCallbackWithLimiter 使用可共享的限流器扫描多个目标。 limiter 控制 target-level concurrency;每个 target 调用 Scan 前 acquire,完成后 release。

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL