From 5b2b867ac2d4e3807a4a7f8bdc18a2ef4463f2b2 Mon Sep 17 00:00:00 2001 From: Yogesh Ojha Date: Sat, 13 Nov 2021 01:20:24 +0530 Subject: [PATCH] Fixed Report Download domain name --- web/startScan/templates/startScan/history.html | 8 ++++---- web/startScan/views.py | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/web/startScan/templates/startScan/history.html b/web/startScan/templates/startScan/history.html index a0ca5a38..ab68088b 100644 --- a/web/startScan/templates/startScan/history.html +++ b/web/startScan/templates/startScan/history.html @@ -175,7 +175,7 @@ {% endif %} {% if scan.scan_status != -1%} - +  Download Report {% endif %} @@ -455,7 +455,7 @@ } } - function initiate_report(id, is_subdomain_scan, is_vulnerability_scan) { + function initiate_report(id, is_subdomain_scan, is_vulnerability_scan, domain_name) { $('#generateReportModal').modal('show'); $('#report_alert_message').empty(); $('#report_type_select').empty(); @@ -492,10 +492,10 @@ })); } - $('#generateReportButton').attr('onClick', `generate_report(${id})`); + $('#generateReportButton').attr('onClick', `generate_report(${id}, '${domain_name}')`); } - function generate_report(id) { + function generate_report(id, domain_name) { var report_type = $("#report_type_select option:selected").val(); $('#generateReportModal').modal('hide'); swal.queue([{ diff --git a/web/startScan/views.py b/web/startScan/views.py index 5bec22d3..17229c32 100644 --- a/web/startScan/views.py +++ b/web/startScan/views.py @@ -724,8 +724,6 @@ def create_report(request, id): html = template.render(data) pdf = HTML(string=html).write_pdf() - print(report_type) - if 'download' in request.GET: response = HttpResponse(pdf, content_type='application/octet-stream') else: