tree

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: AGPL-3.0 Imports: 8 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

This section is empty.

Functions

func ForestBuilder

func ForestBuilder(targets []string, results map[models.ScanContextResultKey]interface{}) map[string]*RootDomain

func ForestDebugPrint

func ForestDebugPrint(forest map[string]*RootDomain)

func HTTPStatusCodeColorer

func HTTPStatusCodeColorer(code int) string

func Pointer

func Pointer[T any](d T) *T

func PrintLegend

func PrintLegend()

Types

type DomainLabel

type DomainLabel struct {
	Labels       map[string]*DomainLabel
	DomainPrefix string
	Hostname     *FQDN
	// contains filtered or unexported fields
}

func NewDomainLabel

func NewDomainLabel(hostname string, level int) *DomainLabel

func (*DomainLabel) AddResult

func (s *DomainLabel) AddResult(hostname string, level int, result interface{}) bool

func (*DomainLabel) HasResult

func (s *DomainLabel) HasResult() bool

func (*DomainLabel) HttpRedirect

func (s *DomainLabel) HttpRedirect() string

func (*DomainLabel) HttpStatus

func (s *DomainLabel) HttpStatus() int

func (*DomainLabel) HttpTitle

func (s *DomainLabel) HttpTitle() string

func (*DomainLabel) Print

func (s *DomainLabel) Print(gctx *globalcontext.GlobalContext, c *PrintConfig, table *MiniTable, parent ParentNode)

func (*DomainLabel) PrintWildcard

func (s *DomainLabel) PrintWildcard(gctx *globalcontext.GlobalContext, c *PrintConfig, table *MiniTable, parent ParentNode)

func (*DomainLabel) SNIFallbackCertificate

func (s *DomainLabel) SNIFallbackCertificate() string

type FQDN

type FQDN struct {
	FQDN string
	// contains filtered or unexported fields
}

func NewFQDN

func NewFQDN(hostname string) *FQDN

func (*FQDN) Print

func (h *FQDN) Print(gctx *globalcontext.GlobalContext, c *PrintConfig, parent ParentNode, table *MiniTable)

type MiniRow

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

func NewRow

func NewRow(hostname string, validcert *bool, httpstatus *int, httptitle string, httpredirect *string, alternateText *string) *MiniRow

func (*MiniRow) Stringify

func (r *MiniRow) Stringify(maxHostnameLength int, gctx *globalcontext.GlobalContext, target string) string

type MiniTable

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

func NewTable

func NewTable() *MiniTable

func (*MiniTable) AddRow

func (t *MiniTable) AddRow(r *MiniRow)

func (*MiniTable) Print

func (t *MiniTable) Print(gctx *globalcontext.GlobalContext, target string)

type ParentNode

type ParentNode interface {
	// HasResult returns true if the node has scan results available
	HasResult() bool
	// SNIFallbackCertificate returns the certificate serial for random subdomain requests
	SNIFallbackCertificate() string
	// HttpStatus returns the HTTP status code from the fallback scan
	HttpStatus() int
	// HttpTitle returns the HTTP page title from the fallback scan
	HttpTitle() string
	// HttpRedirect returns the HTTP redirect URL from the fallback scan
	HttpRedirect() string
}

ParentNode provides access to result data from parent nodes in the domain tree. Both RootDomain and DomainLabel implement this interface to enable unified fallback comparison logic during tree printing.

type PrintConfig

type PrintConfig struct {
	Root       *RootDomain
	Target     string
	AllTargets []string
}

type RootDomain

type RootDomain struct {
	Labels map[string]*DomainLabel
	// contains filtered or unexported fields
}

func NewRootDomain

func NewRootDomain() *RootDomain

func (*RootDomain) AddResult

func (r *RootDomain) AddResult(hostname string, result interface{})

func (*RootDomain) DebugPrint

func (r *RootDomain) DebugPrint(target string)

func (*RootDomain) HasResult

func (r *RootDomain) HasResult() bool

func (*RootDomain) HttpRedirect

func (r *RootDomain) HttpRedirect() string

func (*RootDomain) HttpStatus

func (r *RootDomain) HttpStatus() int

func (*RootDomain) HttpTitle

func (r *RootDomain) HttpTitle() string

func (*RootDomain) Print

func (r *RootDomain) Print(gctx *globalcontext.GlobalContext, c *PrintConfig, table *MiniTable)

func (*RootDomain) SNIFallbackCertificate

func (r *RootDomain) SNIFallbackCertificate() string

func (*RootDomain) TablePrint

func (r *RootDomain) TablePrint(gctx *globalcontext.GlobalContext, c *PrintConfig)

Jump to

Keyboard shortcuts

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