scanner

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Providers = map[string]string{
	"com": "https://rdap.verisign.com/com/v1/domain/",
	"net": "https://rdap.verisign.com/net/v1/domain/",
	"org": "https://rdap.publicinterestregistry.org/rdap/domain/",
	"dev": "https://pubapi.registry.google/rdap/domain/",
	"app": "https://pubapi.registry.google/rdap/domain/",
	"io":  "https://rdap.nic.io/domain/",
	"co":  "https://rdap.nic.co/domain/",
	"xyz": "https://rdap.centralnic.com/xyz/domain/",
}

Providers is kept for backward compatibility — populated from registry cache.

View Source
var SupportedTLDs = []string{"com", "net", "org", "dev", "app", "io", "co", "xyz"}

Functions

func Generate added in v1.1.0

func Generate(length int, pattern string) []string

Generate produces name strings (without TLD) for given length and pattern.

func GenerateAll added in v1.1.0

func GenerateAll(tlds []string, length int, pattern string) []string

GenerateAll creates domains for given TLDs, length, and pattern.

func GenerateDomains

func GenerateDomains(length int, pattern Pattern, tlds []string) []string

GenerateDomains produces pronounceable domain names for the given config.

func GetRDAPEndpoint added in v1.2.0

func GetRDAPEndpoint(tld string) string

GetRDAPEndpoint resolves the RDAP endpoint for any TLD dynamically. Falls back to the hardcoded Providers map if registry has no data.

func InitSupportedTLDs added in v1.2.0

func InitSupportedTLDs()

InitSupportedTLDs populates SupportedTLDs from the registry cache.

Types

type DomainInfo added in v1.5.0

type DomainInfo struct {
	Registrar   string
	CreatedDate string
	ExpiryDate  string
	Status      []string
}

func FetchDomainInfo added in v1.5.0

func FetchDomainInfo(domain, tld string) *DomainInfo

FetchDomainInfo queries RDAP for registrar/dates info on a taken domain.

type Pattern

type Pattern string
const (
	PatternCVC   Pattern = "CVC"
	PatternVCV   Pattern = "VCV"
	PatternCVCV  Pattern = "CVCV"
	PatternCVCVC Pattern = "CVCVC"
	PatternAll   Pattern = "ALL"
)

type Result

type Result struct {
	Domain     string
	TLD        string
	Available  bool
	Error      bool
	Method     string   // primary method that determined result
	Signatures []string // all methods that confirmed: "DNS_NS", "DNS_A", "DNS_MX", "RDAP", "WHOIS", "SSL"
	Timestamp  time.Time
	Pricing    *pricing.PriceResult
	Info       *DomainInfo
}

func CheckMultiple added in v1.6.0

func CheckMultiple(domains []string) []Result

CheckMultiple checks multiple domains synchronously (for MCP/API use).

func CheckSingle added in v1.6.0

func CheckSingle(domain string) Result

CheckSingle checks a single domain synchronously (for MCP/API use).

type Scanner

type Scanner struct {
	OnResult func(Result)
	Done     chan struct{}
	// contains filtered or unexported fields
}

func New

func New(workers int) *Scanner

func NewWithDelay added in v1.3.0

func NewWithDelay(workers int, delay time.Duration) *Scanner

func (*Scanner) Results

func (s *Scanner) Results() []Result

func (*Scanner) Run

func (s *Scanner) Run(domains []string)

func (*Scanner) Stats

func (s *Scanner) Stats() Stats

type Stats

type Stats struct {
	Checked   int64
	Available int64
	Errors    int64
	Total     int
	StartTime time.Time
}

Jump to

Keyboard shortcuts

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