{% macro sanejs_details(details) %}
{% if details is string %} {{ details }} {% else %} This file is known as part of {{ details[0] }} version {{ details[1] }}: {{ details[2] }}. {% if details[3] > 1%} It is also present in {{ details[3] -1 }} other libraries. {%endif%} {%endif%}
{% endmacro %} {% macro indexed_hash(details, identifier_for_toggle) %} {% set total_captures = details['different_url']|length + details['same_url']|length %} {# Only show details if the hits are in an other capture #} {% if total_captures > 0 %}

The same file was seen in {{ total_captures }} other captures.

{# Lists of other captures loading the same content... #}
{% if details['different_url']|length > 0 %} {# ... on other URLs #}

The following captures get the same file from a different URL

    {% for capture_uuid, urlnode_uuid, title, hostname in details['different_url'] %}
  • {{ title }} - {{ hostname }}
  • {% endfor %}
{% endif %}
{% if details['same_url']|length > 0 %} {# ... on the same URL #}

The following captures get the same file from the same URL

    {% for capture_uuid, urlnode_uuid, title, hostname in details['same_url'] %}
  • {{ title }} - {{ hostname }}
  • {% endfor %}
{% endif %}
{% else %}

This file is loaded multiple times in this capture.

{% endif %} {% endmacro %} {% macro indexed_cookies(header_text, button_text, cookies) %} {% if cookies %}
{{ header_text }}
{% endif %} {% endmacro %} {% macro popup_icons(lookup_dict, urlnode, tree_uuid) %}
{% for key, path in lookup_dict.items() %} {% if urlnode[key] %} {% if key == "request_cookie" %} {{ key }} {% elif key == "response_cookie"%} {{ key }} {% elif key in ["js", "exe", "css", "font", "html", "json", "image", "video", "unknown_mimetype", "text", "unset_mimetype", "octet-stream", "livestream"] and not urlnode.empty_response %} {{ key }} {% elif key == "redirect" %} {{ key }} Redirect to: {{ shorten_string(urlnode.redirect_url, 50) }} {% else %} {{ key }} {%endif%} {%endif%} {% endfor %}
{% endmacro %} {% macro shorten_string(string, cut_length) %} {% if string|length > cut_length %} {{ string[:cut_length] }} [...] {% else %} {{ string }} {%endif%} {% endmacro %}