<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
        content="width=device-width, initial-scale=1.0, user-scalable=0,shrink-to-fit=no,  maximum-scale=1, minimum-scale=1">
    <title>CVE-BIN-TOOL | Descriptive Report</title>

    <!-- JavaScript for Plotly -->
    <script> {{ script_plotly }}</script>
    <!-- Bootstrap CSS -->


    <style>
        /* Bootstrap */
        {{ style_bootstrap }}

        /* Mystylesheet */
            {{ style_main }}
    </style>

</head>

<body>
    <div id="interactive_mode">
    <section id="navbar">
        <nav class="navbar navbar-expand-lg bg-nav justify-content-between sticky-top">

            <a class="navbar-brand text-white" href="#">CVE Binary Tool</a>
            <ul class="navbar-nav mr-auto">
                <li class="nav-item">
                    <span class="navbar-text text-white"> Descriptive Report 
                        {% if scanned_dir != '' %}
                        | <small>Scanned Directory: {{ scanned_dir }}</small>
                        {% endif %}
                    </span>
                </li>
            </ul>
            <div class="my-2 my-lg-0">
                <span class="navbar-text text-white mr-sm-2">
                    <svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-calendar-check" fill="currentColor"
                        xmlns="http://www.w3.org/2000/svg">
                        <path fill-rule="evenodd"
                            d="M10.854 7.146a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 1 1 .708-.708L7.5 9.793l2.646-2.647a.5.5 0 0 1 .708 0z" />
                        <path fill-rule="evenodd"
                            d="M1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1zm1-3a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2H2z" />
                        <path fill-rule="evenodd"
                            d="M3.5 0a.5.5 0 0 1 .5.5V1a.5.5 0 0 1-1 0V.5a.5.5 0 0 1 .5-.5zm9 0a.5.5 0 0 1 .5.5V1a.5.5 0 0 1-1 0V.5a.5.5 0 0 1 .5-.5z" />
                    </svg>
                    {{date}}
                </span>
                <button onclick="modePrint()" class="btn btn-info">Print Mode</button>
            </div>

        </nav>
    </section>
    
    <section id="dashboard">
        <div class="container-fluid">
            <noscript>

                <div class="alert alert-warning m-t-20" role="alert">
                    <h4 class="alert-heading"><strong>
                        <svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-exclamation-circle-fill"
                            fill="currentColor" xmlns="http://www.w3.org/2000/svg">
                            <path fill-rule="evenodd"
                                d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4zm.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2z" />
                        </svg> JavaScript is disabled.</strong></h4>
                    <p>JavaScript is required for search and graph generation. To fix the issue please enable JavaScript</p>
                    <hr>
                    <p class="mb-0">For more help on how to enable JavaScript. Click <a
                        href="https://www.tutorialspoint.com/javascript/javascript_enabling.htm" class="alert-link"
                        target="_blank">here</a></p>
                </div>
            </noscript>
            {% if intermediate %}
                {{intermediate}}
            {% endif %}
            {{ dashboard }}
        </div>
        
    </section>

    <section id="showcase">
        <div class="container-fluid">
            <!-- Header All Products -->
            <div class="card bg-title text-light m-t-20 m-b-15">
                <div class="card-header">
                    <div class="row">
                        <div class="col-12">
                            <h5 class="font-weight-light p-t-5">Products Scanned
                                <span style="float: right; font-size: 1vw;">{{ star_warn }}</span>
                            </h5>
                        </div>
                    </div>
                </div>
            </div>

            <div class="row m-b-10">
                <div class="col-9">
                    
                </div>

                <div class="col-3">
                    <div class="input-group">
                        <input id="searchInput" class="form-control" type="text" placeholder="Search" aria-label="Search">
                        <div class="input-group-append">
                            <span class="input-group-text text-primary">
                                <svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-search" fill="currentColor"
                                    xmlns="http://www.w3.org/2000/svg">
                                    <path fill-rule="evenodd"
                                        d="M10.442 10.442a1 1 0 0 1 1.415 0l3.85 3.85a1 1 0 0 1-1.414 1.415l-3.85-3.85a1 1 0 0 1 0-1.415z" />
                                    <path fill-rule="evenodd"
                                        d="M6.5 12a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11zM13 6.5a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0z" />
                                </svg>
                            </span>
                        </div>
                    </div>

                </div>

            </div>
            
            <div class="row p-b-20">
                <div class="col-12">
                    <div class="overflow-auto z-depth-1" style="max-height: 100vh;">
                        <ul class="list-group" id="listProducts">
                            <div class="list-group-item list-group-item-secondary sticky-top">
                                <div class="row">
                                    <div class="col-sm-5"><strong>Vendor Name</strong>
                                    </div>
                                    <div class="col-sm-3"><strong>Product Name</strong>
                                    </div>
                                    <div class="col-sm-2"><strong>Version</strong>
                                    </div>
                                    <div class="col-sm-2"><strong>CVE Count</strong>
                                    </div>
                                </div>
                            </div>
                            {{ products_found }}    
                        </ul>
                    </div>
                </div>
            </div>
            
            
        </div>

    </section>

    <!-- If the scan is done using a CSV or JSON file don't render -->
    {% if (scanned_dir | length != 0) or intermediate %}
        <section id="all_paths">
            <div class="container-fluid">
                <div class="card bg-title text-light m-t-20 m-b-15">
                    <div class="card-header">
                        <div class="row">
                            <div class="col-12">
                                <h5 class="font-weight-light p-t-5">Paths of Scanned Files</h5>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-12">
                        <ul class="list-group">
                            {% for path in all_paths%}
                            <li class="list-group-item">
                                <h5>{{path}}</h5>
                                {% for product in all_paths[path]%}
                                <a onclick="resizeGraph(this)" class="badge badge-pill badge-info text-white" data-toggle="modal"
                                data-target="#modal{{ product }}">{{product}}</a>
                                {% endfor %}
                            </li>
                            {%endfor%}
                        </ul>
                    </div>
                </div>
            </div>
        </section>
    {% endif %}

    <!-- Footer For the Report -->
    <footer>
        <div class="container-fluid bg-footer text-white m-t-20">
            <div class="row bg-dark">
                <div class="col-12 text-center p-t-10 p-b-10">
                    <h2>CVE Binary Tool <span class="badge badge-pill badge-light"><small>v</small> {{ version }}</span></h2>  
                </div>
            </div>
            <div class="row m-t-20 text-dark">
                <div class="col-4">
                    <div class="container">
                        <h4>Facing Issues?</h4>
                        <hr \>
                        <div class="row">
                            <div class="col-12">
                                Let us know by creating a new issue.
                                <p><a href="https://github.com/intel/cve-bin-tool/issues/new" class="btn btn-light btn-sm " target="_blank"><svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-exclamation-circle text-success" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
                            <path fill-rule="evenodd" d="M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
                            <path d="M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995z"/>
                            </svg> New Issue</a></p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-4">
                    <div class="container">
                        <h4>Have Suggestions?</h4>
                        <hr  \>
                        <div class="row">
                            <div class="col-12">
                                Our community will love to hear your invaluable suggestions.
                                <p><a href="https://gitter.im/cve-bin-tool/community" class="btn btn-light btn-sm" target="_blank"><svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-chat-left-text-fill text-primary" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
                                <path fill-rule="evenodd" d="M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4.414a1 1 0 0 0-.707.293L.854 15.146A.5.5 0 0 1 0 14.793V2zm3.5 1a.5.5 0 0 0 0 1h9a.5.5 0 0 0 0-1h-9zm0 2.5a.5.5 0 0 0 0 1h9a.5.5 0 0 0 0-1h-9zm0 2.5a.5.5 0 0 0 0 1h5a.5.5 0 0 0 0-1h-5z"/>
                                </svg> Gitter</a></p> 
                            </div>
                        </div>
                    </div>
        
                </div>
                <div class="col-4">
                    <div class="container">
                        <h4>How to Contribute?</h4>
                        <hr \>
                        <div class="row">
                            <div class="col-12">
                                A good Open Source project always welcome contributors. We cve-bin-tool community welcome new ideas and contribution. Join us to learn about security vulnerabilities in your binaries.
                                <p><a href="https://github.com/intel/cve-bin-tool/issues/new" class="btn btn-light btn-sm " target="_blank"><svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-file-earmark-binary" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
                                <path d="M4 1h5v1H4a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V6h1v7a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2z"/>
                                <path d="M9 4.5V1l5 5h-3.5A1.5 1.5 0 0 1 9 4.5zm-3.474 8.59c.976 0 1.524-.79 1.524-2.205 0-1.412-.548-2.203-1.524-2.203-.978 0-1.526.79-1.526 2.203 0 1.415.548 2.206 1.526 2.206zm-.832-2.205c0-1.05.29-1.612.832-1.612.358 0 .607.247.733.721L4.7 11.137a6.749 6.749 0 0 1-.006-.252zm.832 1.614c-.36 0-.606-.246-.732-.718l1.556-1.145c.003.079.005.164.005.249 0 1.052-.29 1.614-.829 1.614zm5.329.501v-.595H9.73V8.772h-.69l-1.19.786v.688L8.986 9.5h.05v2.906h-1.18V13h3z"/>
                                </svg> GitHub</a></p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row text-center text-dark">
                <div class="col-12 m-t-10">
                    <p>This report was generated with 
                        <svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-heart-fill text-danger" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
                        <path fill-rule="evenodd" d="M8 1.314C12.438-3.248 23.534 4.735 8 15-7.534 4.736 3.562-3.248 8 1.314z"></path>
                        </svg> | cve-bin-tool.
                    </p>
                </div>
            </div>
        </div>
    </footer>
    </div>
    <div id="print_mode" style="display: none;">
        {{ print_mode }}
    </div>
    


    <!-- Jquery -->
    <script>{{ script_jquery }}</script>
    <!-- Bootstrap JS -->
    <script>{{ script_bootstrap }}</script>
    <script>
        {{ script_main }}
    </script>
</body>

</html>