UNPKG

domainlooker

Version:

A fast CLI and MCP server for inspecting domains: WHOIS/RDAP, DNS, SSL, ports, subdomains, with CSV/JSON export.

42 lines 2.31 kB
import { PropagationResult, RecordType } from '../services/propagation.js'; import { DomainInfo, WhoisData, DNSData, SSLData, NetworkData, SubdomainData } from '../types/index.js'; export interface CollectOptions { /** Skip the port scan (the slowest part of a full report). */ quick?: boolean; /** Include subdomain discovery (certificate transparency + common names). */ subdomains?: boolean; /** Per-service timeout overrides (ms). */ whoisTimeoutMs?: number; rdapTimeoutMs?: number; sslTimeoutMs?: number; portTimeoutMs?: number; /** Called with each service failure; lets callers surface errors without the collector printing anything. */ onError?: (service: string, error: unknown) => void; } export declare function hasWhoisData(whois: WhoisData | null | undefined): whois is WhoisData; export declare function hasDnsData(dns: DNSData | null | undefined): dns is DNSData; /** Lightweight, factual checks surfaced at the end of a report and in exports. */ export declare function collectAdvisories(info: DomainInfo): string[]; /** * Gathers domain intelligence with no side effects (no console output, no * spinners). Every method resolves to its data or `null` and never rejects, so * callers can run them concurrently and compose the results freely. This is the * shared engine behind both the CLI and the MCP server. */ export declare class DomainCollector { private whoisService; private dnsService; private sslService; private networkService; private subdomainService; private propagationService; /** Run every enabled lookup in parallel; total time is bounded by the slowest one. */ collect(domain: string, options?: CollectOptions): Promise<DomainInfo>; whois(domain: string, options?: CollectOptions): Promise<WhoisData | null>; dns(domain: string, options?: CollectOptions): Promise<DNSData | null>; ssl(domain: string, options?: CollectOptions): Promise<SSLData | null>; ports(domain: string, options?: CollectOptions): Promise<NetworkData | null>; subdomains(domain: string, options?: CollectOptions): Promise<SubdomainData | null>; propagation(domain: string, recordType?: RecordType, options?: CollectOptions): Promise<PropagationResult | null>; } //# sourceMappingURL=collector.d.ts.map