{% extends "analysis_plugins/general_information.html" %}

{% block analysis_result_details %}

    {% set analysis_result = firmware.processed_analysis[selected_analysis] | split_user_and_password_type %}
	{% for key in analysis_result | sort %}
        <tr>
            <td>
                {{ key }}
            </td>
            <td class="p-0">
                <table class="table table-bordered mb-0">
                    {% for password_type in analysis_result[key] %}
                        <tr>
                            <td style="width: 100px">
                                {{password_type}}
                            </td>
                            <td class="p-0">
                                <table class="table table-bordered mb-0">
                                    {% for item in analysis_result[key][password_type] | sort %}
                                        {% if item not in ["log", "cracked"] %}
                                            <tr{% if item == 'password'%} class="table-danger"{% elif item == 'ERROR'%} class="table-warning"{% endif %}>
                                                <td style="width: 120px">
                                                    {{ item }}
                                                </td>
                                                <td>
                                                    {{ analysis_result[key][password_type][item] }}
                                                </td>
                                            </tr>
                                        {% endif%}
                                    {% endfor %}
                                </table>
                            </td>
                        </tr>
                    {% endfor %}
                </table>
            </td>
        </tr>
	{% endfor %}

{% endblock %}