{% extends "base.html" %} {% block title %}{{ scan.target }} — Results{% endblock %} {% block content %} {# ── Type-aware result body rendering ──────────────────────────────────── #} {% macro ri(result) %} {% set d = result.data %}
{%- if result.result_type == 'open_port' -%}
{{ d.port }} {{ d.service }} {% if d.version %}{{ d.version[:60] }}{% endif %} {% if d.protocol %}{{ d.protocol }}{% endif %} {% if d.scan_engine %}{{ d.scan_engine }}{% endif %} {% if d.danger_warning %} ⚠ {{ d.danger_warning }} {% endif %}
{% if d.banner %}
{{ d.banner[:120] }}
{% endif %} {%- elif result.result_type == 'port_scan_summary' -%} {% set ra = d.risk_assessment or {} %}
OPEN {{ d.open_count }}
SCANNED {{ d.total_scanned }}
{% if d.scan_engine %}
ENGINE {{ d.scan_engine }}
{% endif %} {% if ra.level %}
RISK {{ ra.level }}
{% endif %}
{% if d.dangerous_ports %}
⚠ Dangerous: {% for p in d.dangerous_ports[:8] %}{{ p.port }} — {{ p.warning[:35] }}{% if not loop.last %} · {% endif %}{% endfor %}
{% endif %} {% if d.open_ports %}
{{ d.open_ports | join(' ') }}
{% endif %} {%- elif result.result_type == 'os_detection' -%}
{{ d.os_name or '?' }} {% if d.os_family %}{{ d.os_family }}{% endif %} {% if d.os_gen %}{{ d.os_gen }}{% endif %} {{ d.accuracy }}% accuracy
{% if d.cpe %}
{{ d.cpe }}
{% endif %} {%- elif result.result_type == 'dns_records' -%} {% for rtype, vals in (d.records or {}).items() %}
{{ rtype }} {{ vals[:4] | join(' · ') }}
{% endfor %} {%- elif result.result_type == 'ip_address' -%}
{{ d.ip }} {% if d.domain %}← {{ d.domain }}{% endif %}
{%- elif result.result_type == 'subdomain_summary' -%}
{{ d.discovered_count }} subdomains discovered
{{ (d.subdomains or []) | join(' ') }}
{%- elif result.result_type == 'subdomain' -%}
{{ d.subdomain }} {% if d.ip %}→ {{ d.ip }}{% endif %} {% if d.cname %}CNAME {{ d.cname }}{% endif %}
{%- elif result.result_type == 'email_security' -%}
{% if d.spf_configured %}✓{% else %}✗{% endif %} SPF {% if d.dmarc_configured %}✓{% else %}✗{% endif %} DMARC {% if d.spoofable %} ⚠ DOMAIN SPOOFABLE {% else %} ✓ Not spoofable {% endif %}
{% if d.spf_record %}
{{ d.spf_record }}
{% endif %} {% if d.dmarc_record %}
{{ d.dmarc_record }}
{% endif %} {%- elif result.result_type == 'dnssec' -%}
{% if d.dnssec_enabled %}✓ DNSSEC ENABLED{% else %}⚠ DNSSEC NOT CONFIGURED{% endif %}
{%- elif result.result_type == 'zone_transfer' -%} {% if d.vulnerable %}
⚠ CRITICAL — Zone Transfer Allowed
Nameserver: {{ d.nameserver }} — {{ d.record_count }} records leaked
{% else %}
✓ Zone transfer blocked
{% endif %} {%- elif result.result_type == 'cert_transparency' -%}
{% if d.common_name %}{{ d.common_name }}{% endif %} {% if d.issuer %}{{ d.issuer }}{% endif %} {% if d.not_after %}expires {{ d.not_after }}{% endif %}
{%- elif result.result_type == 'reverse_dns' -%}
{{ d.ip }} {{ d.hostname }}
{%- elif result.result_type == 'technology' -%}
{% if d.category %}{{ d.category }}{% endif %} {{ d.name }} {% if d.version %}{{ d.version }}{% endif %} {{ "%.0f"|format((d.confidence or 0)*100) }}% confidence
{% if d.evidence %}
Evidence: {{ d.evidence[:3] | join(' · ') }}
{% endif %} {%- elif result.result_type == 'security_posture' -%}
Grade {{ d.rating }} {{ d.score }}/100
{% if d.missing %}
Missing: {{ d.missing | join(', ') }}
{% endif %} {% if d.present %}
Present: {{ d.present.keys() | list | join(', ') }}
{% endif %} {% if d.recommendation %}
{{ d.recommendation }}
{% endif %} {%- elif result.result_type == 'tls_certificate' -%}
{{ d.version }} {% if d.issuer and d.issuer.organizationName %} issuer: {{ d.issuer.organizationName }} {% endif %} {% if d.not_after %}expires: {{ d.not_after }}{% endif %}
{% if d.subject and d.subject.commonName %}
CN={{ d.subject.commonName }}
{% endif %} {% if d.cipher %}
cipher: {{ d.cipher[0] if d.cipher is iterable else d.cipher }}
{% endif %} {%- elif result.result_type == 'http_headers' -%} {% if d.server_fingerprint %}
Server{{ d.server_fingerprint }}
{% endif %} {% if d.powered_by %}
X-Powered-By{{ d.powered_by }}
{% endif %} {% if d.interesting_headers %}
{% for h in d.interesting_headers.keys() %}{{ h }}{% endfor %}
{% endif %} {%- elif result.result_type in ('api_endpoint', 'web_resource') -%}
{{ d.status_code }} {{ (d.path or d.url or '?')[:60] }} {% if d.endpoint_type %}{{ d.endpoint_type }}{% endif %} {% if d.is_sensitive %}⚠ SENSITIVE{% endif %} {% if d.requires_auth %}AUTH REQUIRED{% endif %}
{% if d.data_preview %}
{{ d.data_preview | tojson(indent=2) | truncate(300) }}
{% endif %} {%- elif result.result_type == 'graphql_schema' -%}
GraphQL schema — {{ (d.types or []) | length }} types
{{ (d.types or [])[:20] | join(' ') }}
{%- elif result.result_type == 'ip_geolocation' -%}
{% if d.city %}{{ d.city }}{% if d.region or d.country %}, {% endif %}{% endif %} {% if d.region %}{{ d.region }}{% if d.country %}, {% endif %}{% endif %} {% if d.country %}{{ d.country }}{% endif %} {% if d.org %}{{ d.org }}{% endif %}
{% if d.asn %}{{ d.asn }}{% endif %} {% if d.timezone %}{{ d.timezone }}{% endif %} {% if d.is_tor %}⚠ TOR EXIT NODE{% endif %} {% if d.is_vpn %}VPN{% endif %} {% if d.is_proxy %}PROXY{% endif %}
{%- else -%}
{{ result.data | tojson(indent=2) }}
{%- endif %}
{% endmacro %}
TYPE {{ scan.scan_type or '—' }}
PROFILE {{ scan.profile or '—' }}
RESULTS {{ scan.result_count }}
DURATION {% if scan.duration_seconds %}{{ "%.1f"|format(scan.duration_seconds) }}s{% else %}—{% endif %}
SHADOW SCORE
{{ "%.0f"|format(scan.shadow_score or 0) }}/100
THREAT LEVEL {{ (scan.threat_level or 'unknown').upper() }}
{% if is_live %}
LIVE SIGNAL FEED
{{ scan.progress }}%
[OWLSCAN] Ghost run active. Receiving signal...
{% endif %}
{% for module, items in grouped_results.items() %} {% endfor %}
{% for result in results %}
[{{ result.module }}] {{ result.result_type }} ⚡ {{ result.source or '—' }} {% if result.tags %} {% for tag in result.tags[:4] %} {{ tag }} {% endfor %} {% endif %}
CONF {{ "%.0f"|format((result.confidence or 0) * 100) }}% {% if result.is_anomaly %} ⚠ ANOMALY {% endif %} {{ result.timestamp[:16] if result.timestamp else '' }}
{% else %}
🦉

{% if is_live %}Mission in progress — signals incoming...{% else %}No results captured.{% endif %}

{% endfor %}
{% for module, items in grouped_results.items() %}
{% for result in items %}
{{ result.result_type }} ⚡ {{ result.source or '—' }} {% for tag in (result.tags or [])[:4] %} {{ tag }} {% endfor %}
CONF {{ "%.0f"|format((result.confidence or 0) * 100) }}% {% if result.is_anomaly %}{% endif %}
{% endfor %}
{% endfor %}
{% for result in results if result.is_anomaly %}
[{{ result.module }}] {{ result.result_type }} ⚠ ANOMALY
CONF {{ "%.0f"|format((result.confidence or 0) * 100) }}%
{% else %}

No anomalies detected in this ghost run.

{% endfor %}
{% endblock %} {% block scripts %} {% endblock %}