globalcontext

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: 7 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

This section is empty.

Types

type GlobalContext

type GlobalContext struct {
	Certificates          map[string]*x509.Certificate
	CertificateOccurrence map[string][]string

	SearchHeaders bool
	Whois         whois.WHOISCache
	DNSresolver   dns.DNSResolver
	DebugLog      *debug.DebugLogger
	Timeout       time.Duration
	UserAgent     string
	// contains filtered or unexported fields
}

func NewGlobalContext

func NewGlobalContext(dnsResolver dns.DNSResolver) *GlobalContext

func (*GlobalContext) AddCertificate

func (g *GlobalContext) AddCertificate(target string, certificate *x509.Certificate)

func (*GlobalContext) AddHeaderHost

func (g *GlobalContext) AddHeaderHost(host string)

func (*GlobalContext) AddRedirect

func (g *GlobalContext) AddRedirect(redirect string)

func (*GlobalContext) CertificateHostnames

func (g *GlobalContext) CertificateHostnames() []string

func (*GlobalContext) GetCertificateOccurrenceSnapshot

func (g *GlobalContext) GetCertificateOccurrenceSnapshot() map[string][]string

GetCertificateOccurrenceSnapshot returns a thread-safe snapshot of the certificate occurrence map

func (*GlobalContext) GetCertificatesSnapshot

func (g *GlobalContext) GetCertificatesSnapshot() map[string]*x509.Certificate

GetCertificatesSnapshot returns a thread-safe snapshot of the certificates map

func (*GlobalContext) HeaderHostnames

func (g *GlobalContext) HeaderHostnames() []string

func (*GlobalContext) IsReflectedCertificate added in v1.4.0

func (g *GlobalContext) IsReflectedCertificate(serial string) bool

IsReflectedCertificate reports whether the certificate with the given serial was flagged as a reflected (per-SNI dynamically issued) certificate.

func (*GlobalContext) MarkDynamicTarget added in v1.4.0

func (g *GlobalContext) MarkDynamicTarget(target string)

MarkDynamicTarget records that the server behind target issues a distinct certificate per SNI. Hostnames validated against such a target are reflections and must not be reported as findings.

func (*GlobalContext) MarkHTTPReflectingTarget added in v1.4.0

func (g *GlobalContext) MarkHTTPReflectingTarget(target string)

MarkHTTPReflectingTarget records that the server behind target reflects the requested Host back in its redirect (a catch-all), so redirect-based host discovery against it is not a real finding.

func (*GlobalContext) MarkReflectedCertificate added in v1.4.0

func (g *GlobalContext) MarkReflectedCertificate(serial string)

MarkReflectedCertificate records that the certificate with the given serial was issued in response to an unknown/random SNI and merely echoes that name. Names from such certificates must not be fed back into recon.

func (*GlobalContext) RedirectHostnames

func (g *GlobalContext) RedirectHostnames() []string

func (*GlobalContext) RegisterCertificate

func (g *GlobalContext) RegisterCertificate(certificate *x509.Certificate)

func (*GlobalContext) TargetIssuesRandomCerts added in v1.4.0

func (g *GlobalContext) TargetIssuesRandomCerts(target string) bool

TargetIssuesRandomCerts reports whether target was flagged as issuing a per-SNI (dynamic) certificate.

func (*GlobalContext) TargetReflectsHost added in v1.4.0

func (g *GlobalContext) TargetReflectsHost(target string) bool

TargetReflectsHost reports whether target was flagged as reflecting the requested Host into its HTTP redirects.

Jump to

Keyboard shortcuts

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