Help us shape the future of Go! Take the 2026 Go Developer Survey

scan

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package scan adapts the asm engine for the CLI and MCP front-ends: a shared set of parameters, option building, and a run helper. Both a human (CLI) and an AI (MCP) drive the same core discovery service through here.

Index

Constants

This section is empty.

Variables

View Source
var StageNames = []string{"ipdr", "certs"}

StageNames are the stages a caller may skip. subdomains and dns are foundational (everything depends on them) and cannot be skipped; ports is off unless requested.

Functions

func Run

func Run(ctx context.Context, p Params, logs *slog.Logger, progress asm.ProgressFunc) (*asm.Result, error)

Run normalizes the domain and executes the full pipeline. progress may be nil. It is a thin wrapper so the CLI and MCP share identical behavior.

Types

type Params

type Params struct {
	Domain       string
	SkipIPDR     bool
	SkipCerts    bool
	Ports        bool   // run the port scan
	PortType     string // "connect" (default) or "syn"
	PortSpec     string // naabu port spec, e.g. "-", "1-1000", "80,443"
	PortRate     int
	Resolvers    []string
	IPInfoToken  string
	SubfinderCfg string
	MaxTime      time.Duration
}

Params are the knobs both front-ends expose. By default subdomains, dns, ipdr and certs run; the port scan is opt-in (Ports) because it probes every resolved IP, including third-party infrastructure. Set the Skip* fields to turn stages off. Zero values elsewhere mean "default", except Domain which is required.

func (*Params) ApplySkips

func (p *Params) ApplySkips(names []string) error

ApplySkips sets the Skip* fields from stage names, returning an error for an unknown or non-skippable name.

func (Params) Options

func (p Params) Options(logs *slog.Logger) asm.Options

Options converts Params into asm.Options. logs, if non-nil, receives engine stage logging; pass nil to discard.

Jump to

Keyboard shortcuts

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