modules

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact added in v0.1.0

type Artifact struct {
	Name string
	Type string
	Path string
}

type Module

type Module interface {
	Name() string
	Description() string
	Requires() []string
	Produces() []string
	Run(ctx context.Context, runCtx *RunContext, executor runner.Executor) (*Result, error)
}

type NucleiOptions added in v0.1.0

type NucleiOptions struct {
	Severity        string
	ExcludeSeverity string
	Tags            string
	ExcludeTags     string
	RateLimit       int
	TemplatesDir    string
	UpdateTemplates bool
}

NucleiOptions configures the nuclei module's template selection and pacing.

type Registry added in v0.1.0

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

func NewRegistry added in v0.1.0

func NewRegistry() *Registry

func (*Registry) Get added in v0.1.0

func (r *Registry) Get(name string) (Module, bool)

func (*Registry) Register added in v0.1.0

func (r *Registry) Register(m Module)

func (*Registry) Resolve added in v0.1.0

func (r *Registry) Resolve(names []string) ([]Module, error)

type Result

type Result struct {
	Name        string
	Status      string
	OutputFiles map[string]string
}

type RunContext added in v0.1.0

type RunContext struct {
	Target    string
	Profile   string
	DryRun    bool
	Run       *storage.Run
	Scope     *scanScope.Scope
	Artifacts map[string]Artifact

	// Proxy is an optional HTTP/SOCKS proxy (e.g. a Caido or Burp listener
	// such as http://127.0.0.1:8080) that HTTP-capable modules route their
	// traffic through, so findings can be intercepted and triaged manually.
	Proxy string
	// Headers are raw "Name: Value" entries applied to every outgoing HTTP
	// request by modules that support it (e.g. session cookies or auth
	// tokens for authenticated scanning).
	Headers []string
	// Nuclei carries nuclei-specific tuning that has no equivalent in other
	// modules (severity/tag filtering, rate limiting, custom templates).
	Nuclei NucleiOptions
	// NmapConcurrency bounds how many nmap processes run at once. <= 0 means
	// the module picks its own default.
	NmapConcurrency int
	// contains filtered or unexported fields
}

func NewRunContext added in v0.1.0

func NewRunContext(target, profile string, dryRun bool, run *storage.Run, scopes ...*scanScope.Scope) *RunContext

func (*RunContext) AddArtifact added in v0.1.0

func (c *RunContext) AddArtifact(name string, artifact Artifact) error

AddArtifact publishes a module output for downstream consumers. Text artifacts are filtered in place first, making this the central scope boundary for all line-oriented host, URL, IP, and host:port lists.

func (*RunContext) GetArtifact added in v0.1.0

func (c *RunContext) GetArtifact(name string) (Artifact, bool)

func (*RunContext) HeaderArgs added in v0.1.0

func (c *RunContext) HeaderArgs(flag string) []string

HeaderArgs returns repeated flag/value pairs, one per configured header, suitable for tools that accept custom headers as repeatable CLI flags (e.g. "-H" "Authorization: Bearer ...").

func (*RunContext) MustArtifact added in v0.1.0

func (c *RunContext) MustArtifact(name string) (Artifact, error)

func (*RunContext) ProxyArgs added in v0.1.0

func (c *RunContext) ProxyArgs(flag string) []string

ProxyArgs returns the flag/value pair to append to a command's args when a proxy is configured, or nil otherwise. flag is the tool-specific proxy option (e.g. "-proxy", "-x", "--proxy").

func (*RunContext) ProxyHost added in v0.1.0

func (c *RunContext) ProxyHost() string

ProxyHost returns the configured proxy without its scheme, for tools that expect a bare host[:port] rather than a URL (e.g. whatweb's --proxy).

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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