Documentation
¶
Index ¶
- Variables
- func ParallelFilterOfflineTargets(ctx context.Context, targets []string, debugLog *debug.DebugLogger, ...) []string
- func PrintFCertificates(gctx *globalcontext.GlobalContext)
- type ScanConfig
- type ScanContext
- func (h *ScanContext) AddFQDN(fqdn string)
- func (h *ScanContext) AddResult(target string, host string, result interface{})
- func (h *ScanContext) AddTarget(target string)
- func (h *ScanContext) FlagAllHosts()
- func (h *ScanContext) GetHosts() []string
- func (h *ScanContext) GetTargets() []string
- func (h *ScanContext) GetUnscannedHosts() []string
- type ScanItem
- type ScanManager
- func (s *ScanManager) Collect() map[string]*tree.MiniTable
- func (s *ScanManager) EnqueueAll(ctx context.Context, hostnames []string)
- func (s *ScanManager) ParallelRun(ctx context.Context, spinner *spinner.Spinner) error
- func (s *ScanManager) ShowResults(jsonl *output.JSONLWriter)
- func (s *ScanManager) WriteSummary(jsonl *output.JSONLWriter)
Constants ¶
This section is empty.
Variables ¶
var ErrEmptyQueue = errors.New("queue is empty. Expected error")
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 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 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 (*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.