Command main

CLI entry point and fetch orchestration. Source: cmd/isthislegit/main.go. Package main exposes no exported symbols; this page documents behavior.

Arguments

Syntax: isthislegit [FLAGS] <legit_domain> <suspect_domain>. Flags -v/--verbose, -j/--json, -k/--insecure (skips RDAP TLS verification with a warning), --timeout=DUR (Go duration, default 5s), --scale, -h/--help, plus a -- separator. Unknown flags and anything other than exactly two positional domains exit 1 with a usage message. Domains are normalized with dns.NormalizeDomain and validated with dns.ValidSyntax. Fail-closed errors include the underlying fetch cause(s).

Budgets

BudgetValue
Global deadline (both domains)15 seconds
Per-call deadline (DNS, TLS, RDAP)5 seconds, adjustable with --timeout
Attempts per call3, with 1 second between retries

Flow

  1. DNS pre-flight probes each unique domain once across the system and pinned resolvers; system failure aborts (with hijack-aware messaging when public resolvers resolve live). Outcomes are reused downstream, so no resolver is queried twice - identical domains are fetched once and the result shared.
  2. Per-domain fetch in parallel: RDAP (rdap.Query) plus TLS (cert.InspectDomain) concurrently. Field-level failures stay open (Unknown) here.
  3. Fail-closed gate: score.VerifyDataQuality; aborts on missing dates or TLS data for either side.
  4. score.Score produces score, findings, verdict, and age flag.
  5. Render: report.JSON for -j/--json, otherwise report.Human plus report.Verbose when verbose.

Version

Current version string is 1.01, printed in the banner, JSON output, and --scale header. Build target: CGO_ENABLED=0 go build -ldflags="-s -w" -o isthislegit ./cmd/isthislegit.


Licensed under the GNU General Public License v3 - Mark Robillard Jr (MARKMENTAL)