debug removed from detail_scan

This commit is contained in:
Yogesh Ojha
2020-05-16 11:01:35 +05:30
parent b63c1a770d
commit d8511ba8c4
4 changed files with 22 additions and 3 deletions
@@ -0,0 +1,18 @@
# Generated by Django 3.0.6 on 2020-05-16 05:30
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('startScan', '0001_initial'),
]
operations = [
migrations.RenameField(
model_name='scannedsubdomains',
old_name='scan_history_model',
new_name='scan_history',
),
]
+2 -1
View File
@@ -9,11 +9,12 @@ class ScanHistory(models.Model):
scan_type = models.ForeignKey(EngineType, on_delete=models.CASCADE)
def __str__(self):
# debug purpose remove scan type and id in prod
return self.domain_name.domain_name + self.scan_type.scan_type_name + str(self.id)
class ScannedSubdomains(models.Model):
subdomain = models.CharField(max_length=100)
scan_history_model = models.ForeignKey(ScanHistory, on_delete=models.CASCADE)
scan_history = models.ForeignKey(ScanHistory, on_delete=models.CASCADE)
open_ports = models.CharField(max_length=1000)
takeover_possible = models.BooleanField()
http_status = models.IntegerField()
@@ -51,7 +51,7 @@ Scan history
{% else %}
<td class="text-danger">{{ subs.subdomain }}</td>
{% endif %}
<td>{{ subs.id }} {{subs.http_status}}</td>
<td>{{subs.http_status}}</td>
<td>{{ subs.open_ports }}</td>
<td>{{ subs.technology_stack }}</td>
</tr>
+1 -1
View File
@@ -13,6 +13,6 @@ def scan_history(request):
return render(request, 'startScan/history.html', context)
def detail_scan(request, id):
subdomain_details = ScannedSubdomains.objects.filter(scan_history_model__id=id)
subdomain_details = ScannedSubdomains.objects.filter(scan_history__id=id)
context = {'scan_history_active': 'true', 'subdomain':subdomain_details}
return render(request, 'startScan/detail_scan.html', context)