From fc1fe80b4fa98b9c8eb8e5abd3d8b3f9b8300a25 Mon Sep 17 00:00:00 2001 From: Yogesh Ojha Date: Tue, 27 Apr 2021 10:18:50 +0530 Subject: [PATCH] Fixed last scan for subdomains and endpoints --- startScan/templates/startScan/detail_scan.html | 8 ++++---- startScan/views.py | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/startScan/templates/startScan/detail_scan.html b/startScan/templates/startScan/detail_scan.html index bee704e0..7270e3bd 100644 --- a/startScan/templates/startScan/detail_scan.html +++ b/startScan/templates/startScan/detail_scan.html @@ -164,9 +164,9 @@ All Subdomains
Subdomain Changes
-

+

Comparing against the last scan performed on - {{last_scan.last_scan_date}} + {{last_scan_subdomain.last_scan_date}}

{% if new_subdomains.count or removed_subdomains.count %} @@ -216,9 +216,9 @@ All Subdomains

Endpoint Changes
-

+

Comparing against the last scan performed on - {{last_scan.last_scan_date}} + {{last_scan_endpoint.last_scan_date}}

{% if new_urls.count or removed_urls.count %} diff --git a/startScan/views.py b/startScan/views.py index 5e1b9b31..aeafe071 100644 --- a/startScan/views.py +++ b/startScan/views.py @@ -80,7 +80,7 @@ def detail_scan(request, id=None): context['new_subdomains'] = scanned_host_q1.difference(scanned_host_q2) context['removed_subdomains'] = scanned_host_q2.difference(scanned_host_q1) - context['last_scan'] = last_scan + context['last_scan_subdomain'] = last_scan if ScanHistory.objects.filter( domain_name=domain_id).filter( @@ -93,6 +93,7 @@ def detail_scan(request, id=None): context['new_urls'] = endpoint_q1.difference(endpoint_q2) context['removed_urls'] = endpoint_q2.difference(endpoint_q1) + context['last_scan_endpoint'] = last_scan return render(request, 'startScan/detail_scan.html', context)