phisherslapper/docs/main.html

66 lines
3.3 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<title>phisherslapper Developer Docs - Command main</title>
</head>
<body bgcolor="#002b36" text="#a3b8b9" link="#859900" vlink="#b58900">
<font color="#b58900"><h1>Command main</h1></font>
<p>CLI entry point and fetch orchestration. Source:
<tt>cmd/phisherslapper/main.go</tt>. Package <tt>main</tt> exposes no exported
symbols; this page documents behavior.</p>
<font color="#859900"><h2>Arguments</h2></font>
<p>Syntax: <tt>phisherslapper [FLAGS] &lt;legit_domain&gt;
&lt;suspect_domain&gt;</tt>. Flags <tt>-v/--verbose</tt>,
<tt>-j/--json</tt>, <tt>-k/--insecure</tt> (skips RDAP TLS verification with
a warning), <tt>--timeout=DUR</tt> (Go duration, default 5s),
<tt>--scale</tt>, <tt>-h/--help</tt>, plus a
<tt>--</tt> separator. Unknown flags and anything other than exactly two
positional domains exit 1 with a usage message. Domains are normalized with
<a href="dns.html#NormalizeDomain">dns.NormalizeDomain</a> and validated
with <a href="dns.html#ValidSyntax">dns.ValidSyntax</a>. Fail-closed errors
include the underlying fetch cause(s).</p>
<font color="#859900"><h2>Budgets</h2></font>
<table border="1" cellpadding="4">
<tr><th>Budget</th><th>Value</th></tr>
<tr><td>Global deadline (both domains)</td><td>15 seconds</td></tr>
<tr><td>Per-call deadline (DNS, TLS, RDAP)</td><td>5 seconds, adjustable with --timeout</td></tr>
<tr><td>Attempts per call</td><td>3, with 1 second between retries</td></tr>
</table>
<font color="#859900"><h2>Flow</h2></font>
<ol>
<li>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.</li>
<li>Per-domain fetch in parallel: RDAP
(<a href="rdap.html#Query">rdap.Query</a>) plus TLS
(<a href="cert.html#InspectDomain">cert.InspectDomain</a>) 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.</li>
<li>Sender-authority stage (needs both domains): target SPF evaluation for
the suspect's IP plus target DMARC lookup, concurrently. Fail-open.</li>
<li>Fail-closed gate:
<a href="score.html#VerifyDataQuality">score.VerifyDataQuality</a>; aborts
on missing dates or TLS data for either side.</li>
<li><a href="score.html#Score">score.Score</a> produces score, findings,
verdict, relationship, and age flag.</li>
<li>Render: <a href="report.html#JSON">report.JSON</a> for
<tt>-j/--json</tt>, otherwise <a href="report.html#Human">report.Human</a>
plus <a href="report.html#Verbose">report.Verbose</a> when verbose.</li>
</ol>
<font color="#859900"><h2>Version</h2></font>
<p>Current version string is <tt>1.02</tt>, printed in the banner, JSON
output, and <tt>--scale</tt> header. Build target:
<tt>CGO_ENABLED=0 go build -ldflags="-s -w" -o phisherslapper
./cmd/phisherslapper</tt>.</p>
<hr>
<font color="#b58900">Licensed under the GNU General Public License v3 - Mark Robillard Jr (MARKMENTAL)</font>
</body>
</html>