lib

package
v0.0.0-...-5d4bc99 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 20 Imported by: ? modules, 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 CalculateFaviconHash

func CalculateFaviconHash(iconBytes []byte) int32

CalculateFaviconHash computes Shodan-compatible 32-bit MurmurHash3 for favicon bytes.

func CheckDNSHistoryAndMail

func CheckDNSHistoryAndMail(domain string, securityTrailsKey string, cdnChecker *CDNChecker, timeoutSec int) ([]pkg.ResultCandidate, error)

CheckDNSHistoryAndMail combines historical DNS lookups and mail record analysis.

func Execute

func Execute(ctx context.Context, opts *pkg.Options) error

Execute orchestrates origin discovery and candidate verification.

func ExtractMailRecords

func ExtractMailRecords(domain string, cdnChecker *CDNChecker, timeoutSec int) ([]pkg.ResultCandidate, error)

ExtractMailRecords queries MX and SPF TXT records that often point directly to origin subnets.

func ExtractNonCDNCandidates

func ExtractNonCDNCandidates(subdomains []string, cdnChecker *CDNChecker, threads int, timeout int) ([]pkg.ResultCandidate, error)

ExtractNonCDNCandidates resolves subdomains and filters out CDN IP ranges.

func FetchFavicon

func FetchFavicon(domain string, timeoutSec int) ([]byte, error)

FetchFavicon downloads the favicon.ico bytes from the target domain.

func QuerySecurityTrailsHistory

func QuerySecurityTrailsHistory(domain string, apiKey string, cdnChecker *CDNChecker, timeoutSec int) ([]pkg.ResultCandidate, error)

QuerySecurityTrailsHistory fetches historical A records from SecurityTrails.

func ReadSubdomains

func ReadSubdomains(filePath string) ([]string, error)

ReadSubdomains reads lines from an input file or piped standard input.

func ResolveSubdomains

func ResolveSubdomains(hosts []string, threads int, timeoutSec int) (map[string][]string, error)

ResolveSubdomains queries DNS A records for each host using dnsx.

func SearchCensysCertificates

func SearchCensysCertificates(domain string, censysID string, censysSecret string, cdnChecker *CDNChecker, timeoutSec int) ([]pkg.ResultCandidate, error)

SearchCensysCertificates queries the Censys v2 Hosts API for certificates matching the target domain.

func SearchCertificates

func SearchCertificates(domain string, censysID string, censysSecret string, shodanKey string, cdnChecker *CDNChecker, timeoutSec int) ([]pkg.ResultCandidate, error)

SearchCertificates aggregates certificate origin discovery across available engines.

func SearchFaviconQueries

func SearchFaviconQueries(domain string, hash int32, shodanKey string, fofaEmail string, fofaKey string, cdnChecker *CDNChecker, timeoutSec int) ([]pkg.ResultCandidate, error)

SearchFaviconQueries searches Shodan and FOFA for hosts matching the favicon hash.

func SearchShodanCertificates

func SearchShodanCertificates(domain string, shodanKey string, cdnChecker *CDNChecker, timeoutSec int) ([]pkg.ResultCandidate, error)

SearchShodanCertificates queries the Shodan API for hosts serving an SSL certificate matching the domain.

Types

type CDNChecker

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

CDNChecker wraps the ProjectDiscovery cdncheck client for IP filtering.

func NewCDNChecker

func NewCDNChecker() (*CDNChecker, error)

NewCDNChecker instantiates a client pre-loaded with known CDN and WAF IP ranges.

func (*CDNChecker) CheckIP

func (c *CDNChecker) CheckIP(ipStr string) (bool, string, error)

CheckIP determines whether an IP belongs to a CDN or WAF provider.

func (*CDNChecker) FilterCandidateIPs

func (c *CDNChecker) FilterCandidateIPs(ips []string) ([]string, map[string]string)

FilterCandidateIPs takes a list of IPs and separates non-CDN IPs from CDN IPs.

Jump to

Keyboard shortcuts

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