File: //tmp/ezdns_http_check.py
import json
import re
import urllib.request
import urllib.error
BASE = 'https://ezdns.support'
PAGES = [
'/', '/pricing', '/dns-priority-audit', '/dmarc-record-generator',
'/dmarc-p-reject-einrichten', '/dmarc-p-none-fix', '/dmarc-fix',
'/mails-landen-im-spam', '/woocommerce-mails-landen-im-spam',
'/microsoft-365-mails-landen-im-spam', '/google-workspace-mails-landen-im-spam',
'/microsoft-365-dmarc-fix', '/google-workspace-dmarc-fix',
'/microsoft-365-dkim-dmarc', '/google-workspace-dkim-einrichten',
'/spf-checker', '/dmarc-checker', '/dkim-checker', '/dnssec-checker', '/v1/leads'
]
HOSTBILL = 'https://support.panomity.com/cart/priority-support/DNS-Priority-Audit/&step=0'
BANNER = 'https://support.panomity.com/templates/panomity/images/ezdns-priority-audit-cart-banner.jpg'
TIMEOUT = 20
def fetch(url):
req = urllib.request.Request(url, headers={'User-Agent': 'Mozilla/5.0 Codex Revenue Verifier'})
try:
with urllib.request.urlopen(req, timeout=TIMEOUT) as r:
body = r.read().decode('utf-8', errors='replace')
return {'status': r.getcode(), 'url': r.geturl(), 'body': body}
except urllib.error.HTTPError as e:
body = e.read().decode('utf-8', errors='replace') if hasattr(e, 'read') else ''
return {'status': e.code, 'url': url, 'body': body}
def canonical(html):
m = re.search(r'<link[^>]+rel=["\']canonical["\'][^>]+href=["\']([^"\']+)', html, re.I)
return m.group(1) if m else None
sitemap = fetch(BASE + '/sitemap.xml')['body']
llms = fetch(BASE + '/llms.txt')['body']
res = {}
for path in PAGES:
page = fetch(BASE + path)
body = page['body']
res[path] = {
'status': page['status'],
'canonical': canonical(body),
'jsonld_count': len(re.findall(r'<script[^>]+type=["\']application/ld\+json["\']', body, re.I)),
'in_sitemap': path in sitemap,
'mentioned_in_llms': path in llms,
'has_form': '<form' in body.lower(),
'has_cta_text': any(t in body.lower() for t in ['audit für 49', 'priority audit', 'dns priority audit', 'anfrage senden', 'fix anfragen', 'scan starten', 'checkout']),
}
home = fetch(BASE + '/')['body']
reject = fetch(BASE + '/dmarc-p-reject-einrichten')['body']
gen = fetch(BASE + '/dmarc-record-generator')['body']
v1 = fetch(BASE + '/v1/leads')['body']
hostbill = fetch(HOSTBILL)
banner = fetch(BANNER)
summary = {
'pages': res,
'homepage_checks': {
'checkout_bridge': 'checkout-bridge' in home,
'bridge_asset': '/app/assets/ezdns-checkout-diagnostics-bridge.webp' in home,
'checkout_context_form': 'checkoutContextForm' in home,
'checkout_context_ready': 'checkout_context_ready' in home,
'links_m365_spam': '/microsoft-365-mails-landen-im-spam' in home,
'links_google_spam': '/google-workspace-mails-landen-im-spam' in home,
},
'reject_checks': {
'rfc_9989': 'RFC 9989' in reject,
'enforcement_signal': 'Enforcement-Signal' in reject,
'priority_audit_ref': ('Priority Audit' in reject) or ('dns-priority-audit' in reject),
'forbidden_1': 'p=reject stoppt Spoofing' in reject,
'forbidden_2': 'DMARC p=reject schützt vor Spoofing' in reject,
},
'generator_checks': {
'form_id': 'dmarcGeneratorForm' in gen,
'record_pattern': '_dmarc.<domain>' in gen,
'warn_none': 'p=none' in gen,
'warn_quarantine': 'p=quarantine' in gen,
'warn_reject': 'p=reject' in gen,
'intent_generated': 'dmarc_record_generated' in gen,
'intent_copied': 'dmarc_record_copied' in gen,
'intent_tool_checkout': 'tool_checkout' in gen,
'priority_audit_cta': 'Audit für 49 € starten' in gen,
'ezdns_domain': 'ezdns_domain' in gen,
'ezdns_problem_area': 'ezdns_problem_area' in gen,
'ezdns_generated_record': 'ezdns_generated_record' in gen,
'custom_variant': 'custom[' in gen,
'customfield_variant': 'customfield[' in gen,
'config_variant': 'config[' in gen,
'fields_variant': 'fields[' in gen,
},
'v1_leads_checks': {k: (k in v1) for k in ['intent', 'domain', 'contact_email', 'message', 'plan', 'page', 'notification_status']},
'hostbill_checks': {
'status': hostbill['status'],
'product_879': 'DNS Priority Audit' in hostbill['body'],
'price_49': ('49 €' in hostbill['body']) or ('49.00' in hostbill['body']),
'marker': 'data-ezdns-upsell="priority-audit"' in hostbill['body'],
'cta': 'Audit für 49 € starten' in hostbill['body'],
'generator_link': '/dmarc-record-generator' in hostbill['body'],
'banner_path': '/templates/panomity/images/ezdns-priority-audit-cart-banner.jpg' in hostbill['body'],
'data_image': 'data:image' in hostbill['body'],
'smarty_or_fatal': bool(re.search(r'Smarty|Fatal error|Parse error|Warning:', hostbill['body'], re.I)),
'banner_http_status': banner['status'],
}
}
print(json.dumps(summary, ensure_ascii=False, indent=2))