Documentation
¶
Index ¶
- func ForestBuilder(targets []string, results map[models.ScanContextResultKey]interface{}) map[string]*RootDomain
- func ForestDebugPrint(forest map[string]*RootDomain)
- func HTTPStatusCodeColorer(code int) string
- func Pointer[T any](d T) *T
- func PrintLegend()
- func PrintTargetHeading(target string)
- type DNSState
- type DomainLabel
- func (s *DomainLabel) AddResult(hostname string, level int, result interface{}) bool
- func (s *DomainLabel) HasResult() bool
- func (s *DomainLabel) HttpRedirect() string
- func (s *DomainLabel) HttpStatus() int
- func (s *DomainLabel) HttpTitle() string
- func (s *DomainLabel) Print(gctx *globalcontext.GlobalContext, c *PrintConfig, table *MiniTable, ...)
- func (s *DomainLabel) PrintWildcard(gctx *globalcontext.GlobalContext, c *PrintConfig, table *MiniTable, ...)
- func (s *DomainLabel) SNIFallbackCertificate() string
- type FQDN
- type MiniRow
- type MiniTable
- type ParentNode
- type PrintConfig
- type RootDomain
- func (r *RootDomain) AddResult(hostname string, result interface{})
- func (r *RootDomain) BuildTable(gctx *globalcontext.GlobalContext, c *PrintConfig) *MiniTable
- func (r *RootDomain) DebugPrint(target string)
- func (r *RootDomain) HasResult() bool
- func (r *RootDomain) HttpRedirect() string
- func (r *RootDomain) HttpStatus() int
- func (r *RootDomain) HttpTitle() string
- func (r *RootDomain) Print(gctx *globalcontext.GlobalContext, c *PrintConfig, table *MiniTable)
- func (r *RootDomain) SNIFallbackCertificate() string
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 PrintLegend ¶
func PrintLegend()
func PrintTargetHeading ¶ added in v1.4.0
func PrintTargetHeading(target string)
PrintTargetHeading prints the block-cased target heading with a reverse DNS annotation when available. The PTR lookup is bounded so a slow resolver can not stall the report after the scan has ended.
Types ¶
type DNSState ¶ added in v1.4.0
type DNSState string
DNSState describes how a hostname's DNS records relate to the scanned target IP. It is computed once, when the row is built, so that both the table printer and the JSONL writer use the exact same value.
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 (*FQDN) Print ¶
func (h *FQDN) Print(gctx *globalcontext.GlobalContext, c *PrintConfig, parent ParentNode, table *MiniTable)
type MiniRow ¶
type MiniRow struct {
Hostname string
Wildcard bool
AlternateText *string
DNS DNSState
ValidCert *bool
HTTPStatus *int
HTTPTitle string
HTTPRedirect *string
PlainHTTPTLS bool
}
MiniRow is one displayed/exported result row. All decisions about DNS validity and certificate validity are made when the row is built, so a row is pure data and can be rendered multiple ways.
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) BuildTable ¶ added in v1.4.0
func (r *RootDomain) BuildTable(gctx *globalcontext.GlobalContext, c *PrintConfig) *MiniTable
BuildTable assembles the MiniTable for a target. It is shared by the human-readable printer and the JSONL exporter, so both emit identical rows.
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