{% macro taxonomy_table(tree_uuid, categories_info, add_category) %}
{% if add_category %} {% else %} {% endif %} {% if categories_info is mapping %} {% for mt, val in categories_info.items() %} {% endfor %} {% else %} {% for mt in categories_info %} {% endfor %} {% endif %}
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 }}
{{ mt }}
{% endmacro %} {% macro known_content_details(details) %} {% if details %}
{% if details is string %} This ressource is known as a generic file: {{ 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%}
{%endif%} {% endmacro %} {% macro context_form(tree_uuid, urlnode_uuid, hash, callback_str) %}
{% endmacro %} {% macro ressource_legitimacy_details(details) %} {% if details and details[0] == False %} {%endif%} {% 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_cookies(header_text, button_text, cookies) %} {% if cookies %}
{{ header_text }}
{% endif %} {% endmacro %} {% macro request_cookies_icon(urlnode, tree_uuid) %} {% if urlnode.request_cookie %} {% set icon_info = get_icon("request_cookie") %} {{ icon_info['tooltip'] }} {% endif %} {% endmacro %} {% macro pandora_submit(tree_uuid, node_uuid, ressource_hash) %}
{% endmacro %} {% macro hash_info(tree_uuid, urlnode_uuid, mimetype, hash, ressource_size, nb_occurrences, has_pandora, legitimacy, known_content)%} {{ hash_icon(tree_uuid, urlnode_uuid, mimetype, hash) }} Body size (in the HTTP response): {{ sizeof_fmt(ressource_size) }} {{ ressource_legitimacy_details(legitimacy) }} {{ known_content_details(known_content) }} {% if nb_occurrences > 0 %}
This file can be found {{ nb_occurrences }} times across all the captures on this lookyloo instance.

Show more information about this ressource.

{% endif %} {% if has_pandora %} {{ pandora_submit(tree_uuid, urlnode_uuid, hash) }}
{% endif %} {% endmacro %} {% macro hash_icon(tree_uuid, urlnode_uuid, mimetype, hash) %} {% if mimetype %} {% set gt = generic_type(mimetype) %} {% if gt in ["js", "exe", "css", "font", "html", "json", "image", "video", "unknown_mimetype", "text", "unset_mimetype", "octet-stream", "livestream"] %} {% set icon_info = get_icon(gt) %} {{ icon_info['tooltip'] }}
Click to download.' {% else %} data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-html="true" title="{{icon_info['tooltip']}}
Click to download." {% endif %} />
Mimetype: {{mimetype}}
{%endif%} {%endif%} {% endmacro %} {% macro response_cookies_icon(urlnode, tree_uuid) %} {% if urlnode.response_cookie %} {% set icon_info = get_icon("response_cookie") %} {{ icon_info['tooltip'] }} {% endif %} {% endmacro %} {% macro redirect_response(urlnode, tree_uuid) %} {% if urlnode["redirect"] %} {% set icon_info = get_icon('redirect') %} {% for child in urlnode.children if child.name == urlnode.redirect_url %}
Redirect to: {{ shorten_string(urlnode.redirect_url, 50) }}
{% else %} {{ icon_info['tooltip'] }} {% 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 %}