Getting started
Requirements
- Python 3.10 or newer
dnspython,prettytable, andcolored(installed with the package)
Install
Library import:
from lupaxa.mx_inspector import lookup_dmarc, lookup_mx, lookup_spf, score_posture
policy = lookup_dmarc("example.com")
hosts = lookup_mx("example.com")
spf = lookup_spf("example.com")
print(score_posture(policy, mx_hosts=hosts, spf_records=spf))
Module entry point:
From source (development)
First run
Pass one or more domain names. The tool queries public DNS for MX hosts,
SPF, and _dmarc.<domain>, then prints a table. MX servers are first,
then SPF, then every known DMARC tag (unpublished tags show as
missing). The posture score is a footer at the bottom. On a colour
terminal the table is coloured; pass --no-color or set NO_COLOR for
plain text:
JSON output:
SMTP banner fingerprint (authorised targets only). The probe speaks
cleartext SMTP on port 25 by default. Use --port 587 for message
submission, and --timeout if a host is slow:
mx-inspector example.com --probe
mx-inspector example.com --probe --port 587
mx-inspector example.com --probe --timeout 10
mx-inspector example.com --probe --port 587 --timeout 10