From a36261bb2d0e6f74ab924ff13d2ce65aa12acdb3 Mon Sep 17 00:00:00 2001 From: Yogesh Ojha Date: Sun, 25 Apr 2021 00:06:38 +0530 Subject: [PATCH] Added Extra th for vuln scan --- .../templates/startScan/detail_scan.html | 56 ++++--------------- 1 file changed, 12 insertions(+), 44 deletions(-) diff --git a/startScan/templates/startScan/detail_scan.html b/startScan/templates/startScan/detail_scan.html index 29ce574b..f06406d2 100644 --- a/startScan/templates/startScan/detail_scan.html +++ b/startScan/templates/startScan/detail_scan.html @@ -102,7 +102,7 @@ All Subdomains

Subdomains Discovered

{{alive_count}} Alive Subdomains


- View Subdomains +
@@ -120,7 +120,7 @@ All Subdomains

Endpoints Discovered

{{endpoint_alive_count}} Alive Endpoints


- View Endpoints +
@@ -133,7 +133,7 @@ All Subdomains {% if history.scan_type.vulnerability_scan %}

{{critical_count}} Critical, {{high_count}} High

{{medium_count}} Medium Vulnerabilities

- View Vulnerabilities +
{% else %} Vulnerability scan hasn't been performed. Please perform vulnerability scan to identify the vulnerabilities. @@ -347,7 +347,7 @@ All Subdomains
- +
@@ -357,6 +357,7 @@ All Subdomains +
StatusDescription Last Seen StatusMatcher Name
@@ -393,7 +394,7 @@ function fetch_http_headers(id, http_header_path, screenshot_path){ $("#pills-subdomain-tab").click(function() { clear_datatables('#subdomain_scan_results'); - var scan_history_table = $('#subdomain_scan_results').DataTable({ + $('#subdomain_scan_results').DataTable({ "destroy": true, "oLanguage": { "oPaginate": { "sPrevious": '', "sNext": '' }, @@ -701,21 +702,6 @@ $("#pills-directories-tab").click(function() { $('.dataTables_wrapper table').removeClass('table-striped'); $('.badge').tooltip({ template: '' }) $('.dataTables_wrapper table').removeClass('table-striped'); - // get screenshot size from localStorage - var elements = document.getElementsByClassName("screenshot"); - screenshot_size = localStorage.getItem('screenshotSize'); - if (screenshot_size){ - for (index = 0; index < elements.length; ++index) { - elements[index].setAttribute("height", screenshot_size); - elements[index].setAttribute("width", screenshot_size); - } - } - else{ - for (index = 0; index < elements.length; ++index) { - elements[index].setAttribute("height", "200px"); - elements[index].setAttribute("width", "200px"); - } - } }, initComplete: function( settings, json ) { var script = document.createElement("script"); @@ -738,8 +724,8 @@ $("#pills-directories-tab").click(function() { $("#pills-endpoints-tab").click(function() { - clear_datatables('#endpoint_results'); $('#endpoint_results').DataTable({ + "destroy": true, "oLanguage": { "oPaginate": { "sPrevious": '', "sNext": '' }, "sInfo": "Showing page _PAGE_ of _PAGES_", @@ -754,15 +740,7 @@ $("#pills-endpoints-tab").click(function() { "lengthMenu": [20, 50, 100, 500, 1000], "pageLength": 20, 'serverSide': true, - {% if scan_history_id %} "ajax": '/start_scan/api/listEndpoints/?url_of={{scan_history_id}}&format=datatables', - {% else %} - {% if request.GET.query %} - "ajax": '/start_scan/api/listEndpoints/?url_of=&format=datatables&query_param={{request.GET.query}}', - {% else %} - "ajax": '/start_scan/api/listEndpoints/?url_of=&format=datatables', - {% endif %} - {% endif %} "order": [[ 3, "desc" ]], "columns": [ {'data': 'http_url'}, @@ -815,13 +793,13 @@ $("#pills-endpoints-tab").click(function() { }); $("#pills-vulnerabilities-tab").click(function() { - clear_datatables('#vulnerability_results'); $('#vulnerability_results').DataTable({ + "destroy": true, "oLanguage": { "oPaginate": { "sPrevious": '', "sNext": '' }, "sInfo": "Showing page _PAGE_ of _PAGES_", "sSearch": '', - "sSearchPlaceholder": "Search Query...", + "sSearchPlaceholder": "Search...", "sLengthMenu": "Results : _MENU_", }, "dom": "<'row'<'col-lg-10 col-md-10 col-12'f><'col-lg-2 col-md-2 col-12'l>>" + @@ -831,18 +809,8 @@ $("#pills-vulnerabilities-tab").click(function() { "lengthMenu": [20, 50, 100, 500, 1000], "pageLength": 20, 'serverSide': true, - 'orderCellsTop': true, - 'fixedHeader': true, - 'order': [2, 'desc'], - {% if scan_history_id %} "ajax": '/start_scan/api/listVulnerability/?vulnerability_of={{scan_history_id}}&format=datatables', - {% else %} - {% if request.GET.query %} - "ajax": '/start_scan/api/listVulnerability/?vulnerability_of=&format=datatables&query_param={{request.GET.query}}', - {% else %} - "ajax": '/start_scan/api/listVulnerability/?vulnerability_of=&format=datatables', - {% endif %} - {% endif %} + "order": [[ 3, "desc" ]], "columns": [ {'data': 'id'}, {'data': 'name'}, @@ -943,11 +911,11 @@ $("#pills-vulnerabilities-tab").click(function() { "targets": 6, }, ], - 'drawCallback': function () { + drawCallback: function () { $('.t-dot').tooltip({ template: '' }) $('.dataTables_wrapper table').removeClass('table-striped'); }, - 'createdRow': function( row, data, dataIndex ) { + createdRow: function( row, data, dataIndex ) { if (!data['open_status']){ $(row).addClass('table-secondary text-strike'); }