Command main
CLI entry point and fetch orchestration. Source:
cmd/phisherslapper/main.go. Package main exposes no exported
symbols; this page documents behavior.
Arguments
Syntax: phisherslapper [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
| Budget | Value |
| Global deadline (both domains) | 15 seconds |
| Per-call deadline (DNS, TLS, RDAP) | 5 seconds, adjustable with --timeout |
| Attempts per call | 3, with 1 second between retries |
Flow
- 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. The first live A record per side is retained for per-path
probes, and the OS hosts file is checked for static overrides.
- Per-domain fetch in parallel: RDAP
(rdap.Query) plus TLS
(cert.InspectDomain) concurrently,
plus rogue-redirection probes: per-path TLS at the system-resolved and
public-resolved endpoint IPs (SNI preserved) and origin-AS attribution for
both IPs via Team Cymru. Field-level failures stay open (Unknown) here.
- Sender-authority stage (needs both domains): target SPF evaluation for
the suspect's IP plus target DMARC lookup, concurrently. Fail-open.
- Fail-closed gate:
score.VerifyDataQuality; aborts
on missing dates or TLS data for either side.
- score.Score produces score, findings,
verdict, relationship, and age flag.
- Render: report.JSON for
-j/--json, otherwise report.Human
plus report.Verbose when verbose.
Version
Current version string is 1.03, printed in the banner, JSON
output, and --scale header. Build target:
CGO_ENABLED=0 go build -ldflags="-s -w" -o phisherslapper
./cmd/phisherslapper.
Licensed under the GNU General Public License v3 - Mark Robillard Jr (MARKMENTAL)