scan

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: AGPL-3.0 Imports: 21 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyQueue = errors.New("queue is empty. Expected error")
View Source
var InternalIgnoredHosts = []string{
	"*.cloudflaressl.com",
	"*.your-server.de",
	"*.netlify.com",
	"*.cloudflare.com",
	"*.netlify.app",
	"*.t-ipconnect.de",
	"*.versanet.de",
	"*.akamaitechnologies.com",
}

InternalIgnoredHosts contains hosts that are automatically ignored during scans. These are typically CDN/proxy certificate domains that pollute results.

Functions

func ParallelFilterOfflineTargets

func ParallelFilterOfflineTargets(ctx context.Context, targets []string, debugLog *debug.DebugLogger, timeout time.Duration, workers int) []string

func PrintFCertificates

func PrintFCertificates(gctx *globalcontext.GlobalContext)

Types

type ScanConfig

type ScanConfig struct {
	IgnoredHosts    []string // User-provided ignored hosts (displayed in output)
	RequiredHosts   []regexp.Regexp
	ParallelWorkers int
	UsePTR          bool
	UseCRTLog       bool
	CrtLogDB        string // Path to the crt.name local cache directory
	MaxEpochs       int
	DisableRecon    bool
	NoIPasSNI       bool          // Disables sending the target IP as SNI value (non-RFC compliant check)
	NoPlainHTTP     bool          // Disables plaintext HTTP probing of the target IP (on the HTTP port and the target's TLS port)
	PlainHTTPPort   string        // Port used for plaintext HTTP probing (default 80)
	SearchHeaders   bool          // Enables broader search for domains/URLs in HTTP response headers
	Timeout         time.Duration // Global timeout for network operations
}

func NewConfig

func NewConfig() *ScanConfig

func (*ScanConfig) AllIgnoredHosts

func (c *ScanConfig) AllIgnoredHosts() []string

AllIgnoredHosts returns both user-provided and internal ignored hosts for filtering.

func (*ScanConfig) HostIsFiltered added in v1.4.0

func (c *ScanConfig) HostIsFiltered(host string) bool

HostIsFiltered reports whether host should be excluded from the scan queue: either it matches an ignored pattern (user-provided or internal), or require-patterns are configured and none of them matches.

type ScanContext

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

func NewScanContext

func NewScanContext(config *ScanConfig) *ScanContext

func (*ScanContext) AddFQDN

func (h *ScanContext) AddFQDN(fqdn string)

func (*ScanContext) AddResult

func (h *ScanContext) AddResult(target string, host string, result interface{})

func (*ScanContext) AddTarget

func (h *ScanContext) AddTarget(target string)

func (*ScanContext) FlagAllHosts

func (h *ScanContext) FlagAllHosts()

func (*ScanContext) GetHosts

func (h *ScanContext) GetHosts() []string

func (*ScanContext) GetTargets

func (h *ScanContext) GetTargets() []string

func (*ScanContext) GetUnscannedHosts

func (h *ScanContext) GetUnscannedHosts() []string

type ScanItem

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

type ScanManager

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

func DoScan

func DoScan(ctx context.Context, hosts []string, targets []string, config *ScanConfig, gctx *globalcontext.GlobalContext) *ScanManager

func NewScanManager

func NewScanManager(config *ScanConfig, gctx *globalcontext.GlobalContext) *ScanManager

func (*ScanManager) Collect added in v1.4.0

func (s *ScanManager) Collect() map[string]*tree.MiniTable

Collect builds the per-target result tables once, so both the human printer and the JSONL exporter can consume identical data.

func (*ScanManager) EnqueueAll

func (s *ScanManager) EnqueueAll(ctx context.Context, hostnames []string)

func (*ScanManager) ParallelRun

func (s *ScanManager) ParallelRun(ctx context.Context, spinner *spinner.Spinner) error

func (*ScanManager) ShowResults

func (s *ScanManager) ShowResults(jsonl *output.JSONLWriter)

ShowResults prints the human-readable report and, when jsonl is non-nil, writes the matching machine-readable records from the same built rows.

func (*ScanManager) WriteSummary added in v1.4.0

func (s *ScanManager) WriteSummary(jsonl *output.JSONLWriter)

WriteSummary emits the final summary record.

Jump to

Keyboard shortcuts

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