diff --git a/startScan/api/views.py b/startScan/api/views.py index 6edcde70..e9e7be63 100644 --- a/startScan/api/views.py +++ b/startScan/api/views.py @@ -201,7 +201,18 @@ class EndPointViewSet(viewsets.ModelViewSet): def get_queryset(self): req = self.request url_of = req.query_params.get('url_of') - if url_of: + url_query = req.query_params.get('query_param') + if url_query: + if url_query.isnumeric(): + self.queryset = WayBackEndPoint.objects.filter( + Q( + url_of__domain_name__domain_name=url_query) | Q( + http_url=url_query) | Q( + id=url_query)) + else: + self.queryset = WayBackEndPoint.objects.filter( + Q(url_of__domain_name__domain_name=url_query) | Q(http_url=url_query)) + elif url_of: self.queryset = WayBackEndPoint.objects.filter(url_of__id=url_of) return self.queryset else: diff --git a/startScan/templates/startScan/detail_endpoint_scan.html b/startScan/templates/startScan/detail_endpoint_scan.html index 676ffdfb..33547168 100644 --- a/startScan/templates/startScan/detail_endpoint_scan.html +++ b/startScan/templates/startScan/detail_endpoint_scan.html @@ -78,8 +78,12 @@ $(document).ready(function() { {% 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'}, diff --git a/targetApp/templates/target/summary.html b/targetApp/templates/target/summary.html index e9380f7b..04371143 100644 --- a/targetApp/templates/target/summary.html +++ b/targetApp/templates/target/summary.html @@ -268,7 +268,7 @@ Target Summary for {{target.domain_name}} {% include 'base/_items/interesting_recon.html' %} -
+
{% if info_count > 0 or low_count > 0 or medium_count > 0 or high_count > 0 or critical_count > 0 %}