{%- macro render_result_reputation(nerd_result) %} {%- if 'rep' in nerd_result and nerd_result['rep'] %} {%- endif %} {%- if 'fmp' in nerd_result and nerd_result['fmp'] and 'general' in nerd_result['fmp'] and nerd_result['fmp']['general'] %} {%- endif %} {%- if 'hostname' in nerd_result and nerd_result['hostname'] %} {%- endif %} {%- if 'asn' in nerd_result and nerd_result['asn'] %} {%- endif %} {%- if 'geo' in nerd_result and nerd_result['geo'] and 'ctry' in nerd_result['geo'] and nerd_result['geo']['ctry'] %} {%- endif %} {%- if 'bgppref' in nerd_result and nerd_result['bgppref'] %} {%- endif %} {%- if 'ipblock' in nerd_result and nerd_result['ipblock'] %} {%- endif %} {%- if 'bl' in nerd_result and nerd_result['bl'] %} {%- endif %} {%- if 'tags' in nerd_result and nerd_result['tags'] %} {%- endif %}
{{ _("Reputation") }}: {{ '{:.3f}'.format(nerd_result['rep']) }}
{{ _("FMP score") }}: {{ '{:.3f}'.format(nerd_result['fmp']['general']) }}
{{ _("Hostname") }}: {{ nerd_result['hostname'] }}
{{ _("AS number") }}: {{ nerd_result['asn'] | join(", ") }}
{{ _("Country") }}: {{ nerd_result['geo']['ctry'] | upper }} {{ get_country_flag(nerd_result['geo']['ctry']) }}
{{ _("BGP prefix") }}: {{ nerd_result['bgppref'] }}
{{ _("IP block") }}: {{ nerd_result['ipblock'] }}
{{ _("Blacklists") }}: {% for bl in nerd_result['bl'] %} {{ bl }} {% endfor %}
{{ _("Tags") }}: {% for tag in nerd_result['tags'] %} {{ tag['n'] }} ({{ tag['c'] }}x) {% endfor %}
{%- endmacro %} {%- macro get_title() -%} {{ get_icon("module-nerd") }} {{ _("Network Entity Reputation Database") }} {%- endmacro %}