{% macro taxonomy_table(tree_uuid, categories_info, add_category) %}
{% if add_category %} {% else %} {% endif %} {% for mt, val in categories_info.items() %} {% endfor %}
Name Description MachinetagClick to add categoryClick to remove category
{{ val[0].name }} {% if val|length == 3 %} {% if val[2].description %} {{ val[2].description }} {% elif val[2].expanded %} {{ val[2].expanded }} {%endif%} {% elif val[1].description %} {{ val[1].description }} {% else %} {{ val[1].predicate }} {%endif%} {{ mt }}
{% endmacro %} {% macro known_content_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 context_form(tree_uuid, urlnode_uuid, hostnode_uuid, hash, callback_str) %}
{% endmacro %} {% macro get_ressource_button(capture_uuid, urlnode_uuid, hash, text) %}
{% endmacro %} {% macro ressource_legitimacy_details(details, ressource_size) %} {% if details and details[0] == False %} {%endif%} Body size: {{ sizeof_fmt(ressource_size) }} {% if details %} {% if details[0] %} - This file is known legitimate on the following domains: {{ ', '.join(details[1]) }}. {% elif details[0] == False %}

The response sould be considered as {% if details[1] is mapping and details[1].get('tag') %} {{ ', '.join(details[1]['tag']) }} {% else %} phishing {%endif%} {% if details[1] is mapping and details[1].get('target') %} and is targeting the following domain(s): {{ ', '.join(details[1]['target']) }} {% else %} unless it is served by the following domain(s): {{ ', '.join(details[1]) }} {%endif%}

{%endif%} {%endif%} {% endmacro %} {% macro indexed_hash(details, identifier_for_toggle) %} {% set total_captures = details[0] %} {% set other_captures = details[1] %} {# 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 total_captures > 20 %} Note that only 20 captures are displayed here. {% endif %} {% if other_captures['different_url']|length > 0 %} {# ... on other URLs #}

The following captures get the same file from a different URL

{{ other_captures_table(other_captures['different_url']) }}
{% endif %}
{% if other_captures['same_url']|length > 0 %} {# ... on the same URL #}

The following captures get the same file from the same URL

{{ other_captures_table(other_captures['same_url']) }}
{% endif %}
{% endif %} {% endmacro %} {% macro other_captures_table(entries) %}
{% for capture_uuid, urlnode_uuid, title, timestamp, hostname in entries %} {% endfor %}
Title Timestamp Domain
{{ title }} {{ timestamp }} {{ hostname }}
{% 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 }}
Click to download the content of the response in a zip file' {% endif %} />
{% elif key != "redirect" %} {{ key }} {%endif%} {%endif%} {% endfor %}
{% if "redirect" in lookup_dict and urlnode["redirect"] %} {% for child in urlnode.children if child.name == urlnode.redirect_url %}
Redirect to: {{ shorten_string(urlnode.redirect_url, 50) }} {{ key }}
{% else %} redirect {% endfor %} {%endif%}
{% endmacro %} {% macro shorten_string(string, cut_length, with_title=False) %} {% if with_title %}
{%endif%} {% if string|length > cut_length %} {{ string[:cut_length] }} [...] {% else %} {{ string }} {%endif%} {% if with_title %}
{%endif%} {% endmacro %}