sources

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package sources defines the Source interface and shared utilities for all passive subdomain discovery adapters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Normalize

func Normalize(s, domain string) string

Normalize lowercases and trims a subdomain, returning empty string if invalid.

func Register

func Register(s Source)

Register adds a Source implementation to the global registry. Panics on duplicate names – intentional so tests catch it at init time.

func SendResult

func SendResult(ctx context.Context, ch chan<- Result, sourceName, subdomain, domain string)

SendResult is a helper to push a normalised result onto ch without blocking after context cancellation.

Types

type AlienVault

type AlienVault struct{}

func (*AlienVault) Description

func (a *AlienVault) Description() string

func (*AlienVault) Enumerate

func (a *AlienVault) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*AlienVault) Name

func (a *AlienVault) Name() string

func (*AlienVault) NeedsKey

func (a *AlienVault) NeedsKey() bool

func (*AlienVault) RateLimit

func (a *AlienVault) RateLimit() time.Duration

type Anubis

type Anubis struct{}

func (*Anubis) Description

func (a *Anubis) Description() string

func (*Anubis) Enumerate

func (a *Anubis) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*Anubis) Name

func (a *Anubis) Name() string

func (*Anubis) NeedsKey

func (a *Anubis) NeedsKey() bool

func (*Anubis) RateLimit

func (a *Anubis) RateLimit() time.Duration

type BeVigil

type BeVigil struct{}

BeVigil uses the free (no-key) endpoint of bevigil.com.

func (*BeVigil) Description

func (b *BeVigil) Description() string

func (*BeVigil) Enumerate

func (b *BeVigil) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*BeVigil) Name

func (b *BeVigil) Name() string

func (*BeVigil) NeedsKey

func (b *BeVigil) NeedsKey() bool

func (*BeVigil) RateLimit

func (b *BeVigil) RateLimit() time.Duration

type BufferOver

type BufferOver struct{}

func (*BufferOver) Description

func (b *BufferOver) Description() string

func (*BufferOver) Enumerate

func (b *BufferOver) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*BufferOver) Name

func (b *BufferOver) Name() string

func (*BufferOver) NeedsKey

func (b *BufferOver) NeedsKey() bool

func (*BufferOver) RateLimit

func (b *BufferOver) RateLimit() time.Duration

type C99Subdomains

type C99Subdomains struct{}

C99Subdomains uses the c99.nl free subdomain finder.

func (*C99Subdomains) Description

func (c *C99Subdomains) Description() string

func (*C99Subdomains) Enumerate

func (c *C99Subdomains) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*C99Subdomains) Name

func (c *C99Subdomains) Name() string

func (*C99Subdomains) NeedsKey

func (c *C99Subdomains) NeedsKey() bool

func (*C99Subdomains) RateLimit

func (c *C99Subdomains) RateLimit() time.Duration

type Certspotter

type Certspotter struct{}

func (*Certspotter) Description

func (c *Certspotter) Description() string

func (*Certspotter) Enumerate

func (c *Certspotter) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*Certspotter) Name

func (c *Certspotter) Name() string

func (*Certspotter) NeedsKey

func (c *Certspotter) NeedsKey() bool

func (*Certspotter) RateLimit

func (c *Certspotter) RateLimit() time.Duration

type Chaos

type Chaos struct{}

Chaos queries ProjectDiscovery's public Chaos dataset.

func (*Chaos) Description

func (c *Chaos) Description() string

func (*Chaos) Enumerate

func (c *Chaos) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*Chaos) Name

func (c *Chaos) Name() string

func (*Chaos) NeedsKey

func (c *Chaos) NeedsKey() bool

func (*Chaos) RateLimit

func (c *Chaos) RateLimit() time.Duration

type CommonCrawl

type CommonCrawl struct{}

func (*CommonCrawl) Description

func (c *CommonCrawl) Description() string

func (*CommonCrawl) Enumerate

func (c *CommonCrawl) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*CommonCrawl) Name

func (c *CommonCrawl) Name() string

func (*CommonCrawl) NeedsKey

func (c *CommonCrawl) NeedsKey() bool

func (*CommonCrawl) RateLimit

func (c *CommonCrawl) RateLimit() time.Duration

type CrtSh

type CrtSh struct{}

CrtSh queries the crt.sh certificate transparency log search.

func (*CrtSh) Description

func (c *CrtSh) Description() string

func (*CrtSh) Enumerate

func (c *CrtSh) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*CrtSh) Name

func (c *CrtSh) Name() string

func (*CrtSh) NeedsKey

func (c *CrtSh) NeedsKey() bool

func (*CrtSh) RateLimit

func (c *CrtSh) RateLimit() time.Duration

type DNSDumpster

type DNSDumpster struct{}

DNSDumpster scrapes dnsdumpster.com (form-based, respectful rate limit).

func (*DNSDumpster) Description

func (d *DNSDumpster) Description() string

func (*DNSDumpster) Enumerate

func (d *DNSDumpster) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*DNSDumpster) Name

func (d *DNSDumpster) Name() string

func (*DNSDumpster) NeedsKey

func (d *DNSDumpster) NeedsKey() bool

func (*DNSDumpster) RateLimit

func (d *DNSDumpster) RateLimit() time.Duration

type DNSRepo

type DNSRepo struct{}

func (*DNSRepo) Description

func (d *DNSRepo) Description() string

func (*DNSRepo) Enumerate

func (d *DNSRepo) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*DNSRepo) Name

func (d *DNSRepo) Name() string

func (*DNSRepo) NeedsKey

func (d *DNSRepo) NeedsKey() bool

func (*DNSRepo) RateLimit

func (d *DNSRepo) RateLimit() time.Duration

type Digitorus

type Digitorus struct{}

Digitorus queries the free digitorus.com CT-based search.

func (*Digitorus) Description

func (d *Digitorus) Description() string

func (*Digitorus) Enumerate

func (d *Digitorus) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*Digitorus) Name

func (d *Digitorus) Name() string

func (*Digitorus) NeedsKey

func (d *Digitorus) NeedsKey() bool

func (*Digitorus) RateLimit

func (d *Digitorus) RateLimit() time.Duration

type FullHunt

type FullHunt struct{}

func (*FullHunt) Description

func (f *FullHunt) Description() string

func (*FullHunt) Enumerate

func (f *FullHunt) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*FullHunt) Name

func (f *FullHunt) Name() string

func (*FullHunt) NeedsKey

func (f *FullHunt) NeedsKey() bool

func (*FullHunt) RateLimit

func (f *FullHunt) RateLimit() time.Duration

type GitHub

type GitHub struct{}

GitHub searches GitHub's public code search API for domain mentions.

func (*GitHub) Description

func (g *GitHub) Description() string

func (*GitHub) Enumerate

func (g *GitHub) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*GitHub) Name

func (g *GitHub) Name() string

func (*GitHub) NeedsKey

func (g *GitHub) NeedsKey() bool

func (*GitHub) RateLimit

func (g *GitHub) RateLimit() time.Duration

type GoogleCT

type GoogleCT struct{}

GoogleCT queries the Google Certificate Transparency log directly.

func (*GoogleCT) Description

func (g *GoogleCT) Description() string

func (*GoogleCT) Enumerate

func (g *GoogleCT) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*GoogleCT) Name

func (g *GoogleCT) Name() string

func (*GoogleCT) NeedsKey

func (g *GoogleCT) NeedsKey() bool

func (*GoogleCT) RateLimit

func (g *GoogleCT) RateLimit() time.Duration

type HackerTarget

type HackerTarget struct{}

func (*HackerTarget) Description

func (h *HackerTarget) Description() string

func (*HackerTarget) Enumerate

func (h *HackerTarget) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*HackerTarget) Name

func (h *HackerTarget) Name() string

func (*HackerTarget) NeedsKey

func (h *HackerTarget) NeedsKey() bool

func (*HackerTarget) RateLimit

func (h *HackerTarget) RateLimit() time.Duration

type LeakIX

type LeakIX struct{}

func (*LeakIX) Description

func (l *LeakIX) Description() string

func (*LeakIX) Enumerate

func (l *LeakIX) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*LeakIX) Name

func (l *LeakIX) Name() string

func (*LeakIX) NeedsKey

func (l *LeakIX) NeedsKey() bool

func (*LeakIX) RateLimit

func (l *LeakIX) RateLimit() time.Duration

type Netcraft

type Netcraft struct{}

func (*Netcraft) Description

func (n *Netcraft) Description() string

func (*Netcraft) Enumerate

func (n *Netcraft) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*Netcraft) Name

func (n *Netcraft) Name() string

func (*Netcraft) NeedsKey

func (n *Netcraft) NeedsKey() bool

func (*Netcraft) RateLimit

func (n *Netcraft) RateLimit() time.Duration

type Omnisint

type Omnisint struct{}

Omnisint queries sonar.omnisint.io (Project Sonar data).

func (*Omnisint) Description

func (o *Omnisint) Description() string

func (*Omnisint) Enumerate

func (o *Omnisint) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*Omnisint) Name

func (o *Omnisint) Name() string

func (*Omnisint) NeedsKey

func (o *Omnisint) NeedsKey() bool

func (*Omnisint) RateLimit

func (o *Omnisint) RateLimit() time.Duration

type PassiveTotal

type PassiveTotal struct{}

PassiveTotal uses the RiskIQ/PassiveTotal community (free) endpoint.

func (*PassiveTotal) Description

func (p *PassiveTotal) Description() string

func (*PassiveTotal) Enumerate

func (p *PassiveTotal) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*PassiveTotal) Name

func (p *PassiveTotal) Name() string

func (*PassiveTotal) NeedsKey

func (p *PassiveTotal) NeedsKey() bool

func (*PassiveTotal) RateLimit

func (p *PassiveTotal) RateLimit() time.Duration

type Phonebook

type Phonebook struct{}

Phonebook queries phonebook.cz (IntelX search) for subdomains.

func (*Phonebook) Description

func (p *Phonebook) Description() string

func (*Phonebook) Enumerate

func (p *Phonebook) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*Phonebook) Name

func (p *Phonebook) Name() string

func (*Phonebook) NeedsKey

func (p *Phonebook) NeedsKey() bool

func (*Phonebook) RateLimit

func (p *Phonebook) RateLimit() time.Duration

type RapidDNS

type RapidDNS struct{}

func (*RapidDNS) Description

func (r *RapidDNS) Description() string

func (*RapidDNS) Enumerate

func (r *RapidDNS) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*RapidDNS) Name

func (r *RapidDNS) Name() string

func (*RapidDNS) NeedsKey

func (r *RapidDNS) NeedsKey() bool

func (*RapidDNS) RateLimit

func (r *RapidDNS) RateLimit() time.Duration

type ReconDev

type ReconDev struct{}

ReconDev queries recon.dev free API.

func (*ReconDev) Description

func (r *ReconDev) Description() string

func (*ReconDev) Enumerate

func (r *ReconDev) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*ReconDev) Name

func (r *ReconDev) Name() string

func (*ReconDev) NeedsKey

func (r *ReconDev) NeedsKey() bool

func (*ReconDev) RateLimit

func (r *ReconDev) RateLimit() time.Duration

type Result

type Result struct {
	Subdomain string
	Source    string
	Timestamp time.Time
}

Result represents a single subdomain discovered from a source.

type Riddler

type Riddler struct{}

func (*Riddler) Description

func (r *Riddler) Description() string

func (*Riddler) Enumerate

func (r *Riddler) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*Riddler) Name

func (r *Riddler) Name() string

func (*Riddler) NeedsKey

func (r *Riddler) NeedsKey() bool

func (*Riddler) RateLimit

func (r *Riddler) RateLimit() time.Duration

type Robtex

type Robtex struct{}

func (*Robtex) Description

func (r *Robtex) Description() string

func (*Robtex) Enumerate

func (r *Robtex) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*Robtex) Name

func (r *Robtex) Name() string

func (*Robtex) NeedsKey

func (r *Robtex) NeedsKey() bool

func (*Robtex) RateLimit

func (r *Robtex) RateLimit() time.Duration

type SecurityTrails

type SecurityTrails struct{}

SecurityTrails uses the free public endpoint (limited results, no key).

func (*SecurityTrails) Description

func (s *SecurityTrails) Description() string

func (*SecurityTrails) Enumerate

func (s *SecurityTrails) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*SecurityTrails) Name

func (s *SecurityTrails) Name() string

func (*SecurityTrails) NeedsKey

func (s *SecurityTrails) NeedsKey() bool

func (*SecurityTrails) RateLimit

func (s *SecurityTrails) RateLimit() time.Duration

type Shodan

type Shodan struct{}

Shodan uses the free (unauthenticated) DNS/domain endpoint.

func (*Shodan) Description

func (s *Shodan) Description() string

func (*Shodan) Enumerate

func (s *Shodan) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*Shodan) Name

func (s *Shodan) Name() string

func (*Shodan) NeedsKey

func (s *Shodan) NeedsKey() bool

func (*Shodan) RateLimit

func (s *Shodan) RateLimit() time.Duration

type ShrewdEye

type ShrewdEye struct{}

func (*ShrewdEye) Description

func (s *ShrewdEye) Description() string

func (*ShrewdEye) Enumerate

func (s *ShrewdEye) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*ShrewdEye) Name

func (s *ShrewdEye) Name() string

func (*ShrewdEye) NeedsKey

func (s *ShrewdEye) NeedsKey() bool

func (*ShrewdEye) RateLimit

func (s *ShrewdEye) RateLimit() time.Duration

type SiteDossier

type SiteDossier struct{}

func (*SiteDossier) Description

func (s *SiteDossier) Description() string

func (*SiteDossier) Enumerate

func (s *SiteDossier) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*SiteDossier) Name

func (s *SiteDossier) Name() string

func (*SiteDossier) NeedsKey

func (s *SiteDossier) NeedsKey() bool

func (*SiteDossier) RateLimit

func (s *SiteDossier) RateLimit() time.Duration

type Source

type Source interface {
	// Name returns the short, unique identifier (e.g. "crtsh").
	Name() string
	// Description is a one-line human-friendly description.
	Description() string
	// Enumerate starts discovery and sends results on the returned channel,
	// closing it when done or when ctx is cancelled.
	Enumerate(ctx context.Context, domain string) (<-chan Result, error)
	// RateLimit is the minimum delay between requests to this source.
	RateLimit() time.Duration
	// NeedsKey reports whether an API key is required.
	NeedsKey() bool
}

Source is the interface every passive adapter must implement.

func All

func All() []Source

All returns all registered sources sorted by name.

func Enabled

func Enabled(disabled []string) []Source

Enabled returns sources not in the disabled set.

func Get

func Get(name string) Source

Get returns a source by name, or nil.

type SubdomainCenter

type SubdomainCenter struct{}

func (*SubdomainCenter) Description

func (s *SubdomainCenter) Description() string

func (*SubdomainCenter) Enumerate

func (s *SubdomainCenter) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*SubdomainCenter) Name

func (s *SubdomainCenter) Name() string

func (*SubdomainCenter) NeedsKey

func (s *SubdomainCenter) NeedsKey() bool

func (*SubdomainCenter) RateLimit

func (s *SubdomainCenter) RateLimit() time.Duration

type Synapsint

type Synapsint struct{}

func (*Synapsint) Description

func (s *Synapsint) Description() string

func (*Synapsint) Enumerate

func (s *Synapsint) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*Synapsint) Name

func (s *Synapsint) Name() string

func (*Synapsint) NeedsKey

func (s *Synapsint) NeedsKey() bool

func (*Synapsint) RateLimit

func (s *Synapsint) RateLimit() time.Duration

type TLSBufferOver

type TLSBufferOver struct{}

TLSBufferOver uses the TLS.bufferover.run dataset.

func (*TLSBufferOver) Description

func (t *TLSBufferOver) Description() string

func (*TLSBufferOver) Enumerate

func (t *TLSBufferOver) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*TLSBufferOver) Name

func (t *TLSBufferOver) Name() string

func (*TLSBufferOver) NeedsKey

func (t *TLSBufferOver) NeedsKey() bool

func (*TLSBufferOver) RateLimit

func (t *TLSBufferOver) RateLimit() time.Duration

type ThreatCrowd

type ThreatCrowd struct{}

func (*ThreatCrowd) Description

func (t *ThreatCrowd) Description() string

func (*ThreatCrowd) Enumerate

func (t *ThreatCrowd) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*ThreatCrowd) Name

func (t *ThreatCrowd) Name() string

func (*ThreatCrowd) NeedsKey

func (t *ThreatCrowd) NeedsKey() bool

func (*ThreatCrowd) RateLimit

func (t *ThreatCrowd) RateLimit() time.Duration

type ThreatMiner

type ThreatMiner struct{}

func (*ThreatMiner) Description

func (t *ThreatMiner) Description() string

func (*ThreatMiner) Enumerate

func (t *ThreatMiner) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*ThreatMiner) Name

func (t *ThreatMiner) Name() string

func (*ThreatMiner) NeedsKey

func (t *ThreatMiner) NeedsKey() bool

func (*ThreatMiner) RateLimit

func (t *ThreatMiner) RateLimit() time.Duration

type URLScan

type URLScan struct{}

func (*URLScan) Description

func (u *URLScan) Description() string

func (*URLScan) Enumerate

func (u *URLScan) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*URLScan) Name

func (u *URLScan) Name() string

func (*URLScan) NeedsKey

func (u *URLScan) NeedsKey() bool

func (*URLScan) RateLimit

func (u *URLScan) RateLimit() time.Duration

type VirusTotal

type VirusTotal struct{}

VirusTotal uses the public (unauthenticated) endpoint only.

func (*VirusTotal) Description

func (v *VirusTotal) Description() string

func (*VirusTotal) Enumerate

func (v *VirusTotal) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*VirusTotal) Name

func (v *VirusTotal) Name() string

func (*VirusTotal) NeedsKey

func (v *VirusTotal) NeedsKey() bool

func (*VirusTotal) RateLimit

func (v *VirusTotal) RateLimit() time.Duration

type Wayback

type Wayback struct{}

Wayback queries the Wayback Machine CDX API for URLs mentioning the domain.

func (*Wayback) Description

func (w *Wayback) Description() string

func (*Wayback) Enumerate

func (w *Wayback) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*Wayback) Name

func (w *Wayback) Name() string

func (*Wayback) NeedsKey

func (w *Wayback) NeedsKey() bool

func (*Wayback) RateLimit

func (w *Wayback) RateLimit() time.Duration

type WebArchiveSubfinder

type WebArchiveSubfinder struct{}

WebArchiveSubfinder queries archive.org for all unique domains seen under the target.

func (*WebArchiveSubfinder) Description

func (w *WebArchiveSubfinder) Description() string

func (*WebArchiveSubfinder) Enumerate

func (w *WebArchiveSubfinder) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*WebArchiveSubfinder) Name

func (w *WebArchiveSubfinder) Name() string

func (*WebArchiveSubfinder) NeedsKey

func (w *WebArchiveSubfinder) NeedsKey() bool

func (*WebArchiveSubfinder) RateLimit

func (w *WebArchiveSubfinder) RateLimit() time.Duration

type WebRiskDB

type WebRiskDB struct{}

WebRiskDB uses the free whoisxmlapi subdomain lookup (no key for limited results).

func (*WebRiskDB) Description

func (w *WebRiskDB) Description() string

func (*WebRiskDB) Enumerate

func (w *WebRiskDB) Enumerate(ctx context.Context, domain string) (<-chan Result, error)

func (*WebRiskDB) Name

func (w *WebRiskDB) Name() string

func (*WebRiskDB) NeedsKey

func (w *WebRiskDB) NeedsKey() bool

func (*WebRiskDB) RateLimit

func (w *WebRiskDB) RateLimit() time.Duration

Jump to

Keyboard shortcuts

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