{% import "macros.txt.j2" as macros with context %}
{% for ip_multi_context in results %}
{%- if ip_multi_context.seen %}
          <header>OVERVIEW</header>
----------------------------
<key>Actor</key>: <value>{{ ip_multi_context.actor }}</value>
<key>Classification</key>: {{ macros.classification(ip_multi_context.classification) }}
<key>First seen</key>: <value>{{ ip_multi_context.first_seen }}</value>
<key>IP</key>: <value>{{ ip_multi_context.ip }}</value>
<key>Last seen</key>: <value>{{ ip_multi_context.last_seen }}</value>
{% if ip_multi_context.tags -%}
<key>Tags</key>:
{%- call(tag) macros.verbose_list(ip_multi_context.tags) -%}
- <value>{{ tag }}</value>
{% endcall -%}
{% endif %}
          <header>METADATA</header>
----------------------------
<key>ASN</key>: <value>{{ ip_multi_context.metadata.asn }}</value>
<key>Category</key>: <value>{{ ip_multi_context.metadata.category }}</value>
<key>Location</key>: <value>{{ ip_multi_context.metadata.location }}</value>
<key>Region</key>: <value>{{ ip_multi_context.metadata.region }}</value>
<key>Organization</key>: <value>{{ ip_multi_context.metadata.organization }}</value>
<key>OS</key>: <value>{{ ip_multi_context.metadata.os }}</value>
<key>rDNS</key>: <value>{{ ip_multi_context.metadata.rdns }}</value>
<key>Spoofable</key>: <value>{{ ip_multi_context.spoofable|string }}</value>
<key>Tor</key>: <value>{{ ip_multi_context.metadata.tor }}</value>

          <header>RAW DATA</header>
----------------------------
{%- if ip_multi_context.cve %}
[CVE]
{%- call(cve) macros.verbose_list(ip_multi_context.cve) -%}
- <key>CVE</key>: <value>{{ cve }}</value>
{% endcall -%}
{% endif %}

{%- if ip_multi_context.raw_data.scan %}
[Scan]
{%- call(scan) macros.verbose_list(ip_multi_context.raw_data.scan) -%}
- <key>Port/Proto</key>: <value>{{ scan.port }}/{{ scan.protocol }}</value>
{% endcall -%}
{% endif %}

{%- if ip_multi_context.raw_data.web.paths %}
[Paths]
{%- call(path) macros.verbose_list(ip_multi_context.raw_data.web.paths) -%}
- <value>{{ path }}</value>
{% endcall -%}
{% endif %}

{%- if ip_multi_context.raw_data.web.useragents %}
[Useragents]
{%- call(useragent) macros.verbose_list(ip_multi_context.raw_data.web.useragents) -%}
- <value>{{ useragent }}</value>
{% endcall -%}
{% endif %}

{%- if ip_multi_context.raw_data.ja3 %}
[JA3]
{%- call(ja3) macros.verbose_list(ip_multi_context.raw_data.ja3) -%}
- <key>Port</key>: <value>{{ ja3.port }}</value>, <key>Fingerprint</key>: <value>{{ ja3.fingerprint }}</value>
{% endcall -%}
{% endif %}
{%- elif ip_multi_context.error %}
{{ ip_multi_context.error }}
{% else %}
<not-noise>{{ ip_multi_context.ip }}</not-noise> is classified as <bold>NOT NOISE</bold>.
{%- endif %}
{%- endfor %}
