{% macro safebrowsing(domain, state) -%} {# icon depending on the Safebrowsing online diagnostics state #} {% if state is not none -%} {{ {"1":"!", "0":"☀", "":"‽"}[state] }} {%- endif %} {%- endmacro %} {% macro shortenable(l, class, max, href_prepend="") -%} {# if list is longer than 15, print out first 10 and tell that there is another X hidden #} {% if l|length > max -%} {% set i = max*2/3|int %} {% set text = l|length - i %} {% set l = l[:(max*2/3)|int] %} {% endif %} {% for el in l -%} {% if href_prepend -%} {{ el }} {% else %} {{ el }} {%- endif %} {%- endfor %} {% if text -%} ... ({{ text|int }}) {%- endif %} {%- endmacro %}

{{ output["title"] }}

{% if output["paging"] %} {% endif %} {{ safebrowsing(output["host"], output["sfb"]) }} {% if output["scans"] -%}
{% for scan in output["scans"] -%} {{ scan|format_datetime }} {%- endfor %}
{% endif %} {% for vote in ["block", "log", "suspicious", "n/a", "allow"] -%}
{% for domain in output["domains"][vote].values() -%}
{{ safebrowsing(domain["domain"], domain["sfb"]) }} {% for val in ["block", "log", "n/a", "allow"] -%} {% endfor %} {{ domain["domain"] }}
{% for address_name, address in domain["addresses"].items() -%} {{ address_name }} {% if address.country -%}} {{ address.country }} {% endif %} {% if address.city -%}} {{ address.city }} {% endif %} {% endfor %} {{ shortenable(domain["related"], "related", 15, "api=html/scan=") }} {# # XX PDNS link nelze dát, protože je tolik linku, kolik IP ma navstiveny host. Lze udelat, ze odkaz povede na vypis vsech domen. XDomains.get_pdns_link(crawl[domain]) #} {{ shortenable(domain["pdns"], "pdns", 15) }}
    {% for url_name, url in domain["urls"].items() -%}
  • {{ url_name }} {% for spyfile in url["spyfiles"].values() -%}
    {{ spyfile["text"]|safe }}
    {% if spyfile["full-link"] -%} -> {%- endif %} {%- endfor %} {% for link in url["sourcefiles"] -%} {%- endfor %}
  • {%- endfor %}
{%- endfor %}
{%- endfor %}
{% if output["screenfile"] %}
{% endif %}