#!/usr/bin/env bash set -uo pipefail cd "$(dirname "$0")"; rm -rf recorded reports; mkdir -p recorded reports { python3 --version; date -u +"run date (UTC): %Y-%m-%d"; } > recorded/00-versions.txt python3 make_synthetic_reports.py > recorded/01-generate.txt python3 parse_reports.py reports > recorded/02-summary.txt # live snapshot of published DMARC records over DNS-over-HTTPS (examples; they change) for d in github.com atlassian.com; do printf '%s\t' "_dmarc.$d" curl -s --max-time 10 -H 'accept: application/dns-json' "https://cloudflare-dns.com/dns-query?name=_dmarc.$d&type=TXT" | python3 -c "import sys,json;print(' | '.join(a['data'] for a in json.load(sys.stdin).get('Answer',[]) if a['type']==16))" done > recorded/03-live-snapshot.txt node check_stages.mjs > recorded/04-checker-stages.txt 2>&1