mirror of
https://github.com/yogeshojha/rengine.git
synced 2026-09-18 07:47:42 +02:00
Fixed multiple scan ui
This commit is contained in:
@@ -126,7 +126,7 @@ Scan Engines
|
||||
|
||||
|
||||
{% block page_level_script %}
|
||||
<script src="{% static 'custom/custom.js' %}"></script>
|
||||
<script src="{% static 'scanEngine/js/custom_scan_engine.js' %}"></script>
|
||||
<script src="{% static 'plugins/datatable/datatables.js' %}"></script>
|
||||
<script type="text/javascript">
|
||||
c3 = $('#style-3').DataTable({
|
||||
|
||||
@@ -6,11 +6,7 @@ Start Scan
|
||||
{% endblock title %}
|
||||
|
||||
|
||||
{% block custom_js_css_link %}>
|
||||
<link href="{% static 'assets/css/components/custom-list-group.css' %}" rel="stylesheet" type="text/css">
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'assets/css/elements/alert.css' %}">
|
||||
<link href="{% static 'assets/css/components/tabs/custom-accordions.css' %}" rel="stylesheet" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'assets/css/custom.css' %}">
|
||||
{% block custom_js_css_link %}
|
||||
{% endblock custom_js_css_link %}
|
||||
|
||||
{% block breadcrumb_title %}
|
||||
@@ -18,48 +14,37 @@ Start Scan
|
||||
<li class="breadcrumb-item active">Initiate Multiple Scans</li>
|
||||
{% endblock breadcrumb_title %}
|
||||
|
||||
{% block page_title %}
|
||||
Initiate Scan for Multiple Targets
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block main_content %}
|
||||
<div class="statbox widget box box-shadow">
|
||||
<div class="widget-header">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h4 class="text-info">Start Scan for <span class="text-danger">{{ domain_list }}</span></h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="widget-content widget-content-area">
|
||||
<form method="POST">
|
||||
{% csrf_token %}
|
||||
<div class="form-row">
|
||||
<div class="col-md-12 mb-4">
|
||||
<h6>Select the scan type</h6>
|
||||
{% if custom_engine_count == 0 %}
|
||||
<div class="alert custom-alert-1 mb-4" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" data-dismiss="alert" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x close"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button>
|
||||
<div class="media">
|
||||
<div class="alert-icon">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather feather-bell"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path></svg>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<div class="alert-text">
|
||||
<span><b>Tips! </b>You don't have any custom engines! Did you know you can create your own scan engine?</span>
|
||||
</div>
|
||||
<div class="alert-btn">
|
||||
<a href="{% url 'add_engine' %}" class="btn btn-default btn-dismiss">Create Engine</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title">Initiating multiple scan for {{ domain_list|length }} targets: </h4>
|
||||
{% for domain in domain_list %}
|
||||
<span class="badge bg-dark">{{domain}}</span>
|
||||
{% endfor %}
|
||||
<form method="POST">
|
||||
{% csrf_token %}
|
||||
<h4 class="header-title mt-4">Select the scan type</h4>
|
||||
<div class="mt-4">
|
||||
{% if custom_engine_count == 0 %}
|
||||
<div class="alert bg-soft-primary border-0 mb-4" role="alert">
|
||||
<span><b>Tips! </b> You do not have any custom scan engines. Would you like to create your own scan engine?</span>
|
||||
<a href="{% url 'add_engine' %}" class="text-primary">Create Custom Scan Engine</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<input type="hidden" name="list_of_domain_id" value="{{domain_ids}}">
|
||||
{% include "startScan/_items/scanEngine_select.html" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include "startScan/_items/scanEngine_select.html" %}
|
||||
<div style=" position: fixed; bottom: 40px; right: 40px; z-index:1000;">
|
||||
<button class="btn btn-primary submit-fn mt-2 float-right" style="z-index:1000; " type="submit"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather table-scan feather-zap" id="myInput" value="helloworld">
|
||||
<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon>
|
||||
</svg> Start Scan</button>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="list_of_domain_id" value="{{domain_ids}}">
|
||||
</form>
|
||||
<button class="btn btn-primary submit-fn mt-2 float-end" type="submit"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather table-scan feather-zap" id="myInput" value="helloworld">
|
||||
<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon>
|
||||
</svg> Start Scan</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -67,5 +52,4 @@ Start Scan
|
||||
|
||||
|
||||
{% block page_level_script %}
|
||||
<script src="{% static 'assets/js/scrollspyNav.js' %}"></script>
|
||||
{% endblock page_level_script %}
|
||||
|
||||
@@ -178,7 +178,6 @@ def start_scan_ui(request, domain_id):
|
||||
|
||||
def start_multiple_scan(request):
|
||||
# domain = get_object_or_404(Domain, id=host_id)
|
||||
domain_text = ""
|
||||
if request.method == "POST":
|
||||
if request.POST.get('scan_mode', 0):
|
||||
# if scan mode is available, then start the scan
|
||||
@@ -204,12 +203,10 @@ def start_multiple_scan(request):
|
||||
list_of_domain_name = []
|
||||
list_of_domain_id = []
|
||||
for key, value in request.POST.items():
|
||||
print(value)
|
||||
if key != "list_target_table_length" and key != "csrfmiddlewaretoken":
|
||||
domain = get_object_or_404(Domain, id=value)
|
||||
list_of_domain_name.append(domain.name)
|
||||
list_of_domain_id.append(value)
|
||||
domain_text = ", ".join(list_of_domain_name)
|
||||
domain_ids = ",".join(list_of_domain_id)
|
||||
engine = EngineType.objects
|
||||
custom_engine_count = EngineType.objects.filter(
|
||||
@@ -217,7 +214,7 @@ def start_multiple_scan(request):
|
||||
context = {
|
||||
'scan_history_active': 'active',
|
||||
'engines': engine,
|
||||
'domain_list': domain_text,
|
||||
'domain_list': list_of_domain_name,
|
||||
'domain_ids': domain_ids,
|
||||
'custom_engine_count': custom_engine_count}
|
||||
return render(request, 'startScan/start_multiple_scan_ui.html', context)
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
<div class="statbox widget box box-shadow">
|
||||
<div class="widget-header">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h4>{{widget_title}}</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="widget-content widget-content-area">
|
||||
<form class="simple-example" method="POST">
|
||||
{% csrf_token %}
|
||||
<div class="form-row">
|
||||
<div class="col-md-6 mb-4">
|
||||
<label for="domainName">Domain name</label>
|
||||
{{ form.name }}
|
||||
{% if form.errors %}
|
||||
<div class="invalid-feedback" style="display: block;">
|
||||
{{ form.errors.name|striptags }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-md-6 mb-4">
|
||||
<label for="domainDescription">Description (Optional)</label>
|
||||
{{ form.description }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="creative3-accordion-content">
|
||||
<div id="iconsAccordion" class="accordion-icons">
|
||||
<div class="card">
|
||||
<div class="card-header" id="headingOne3">
|
||||
<section class="mb-0 mt-0">
|
||||
<div role="menu" class="collapsed" data-toggle="collapse" data-target="#hackerone_accordion" aria-expanded="true" aria-controls="hackerone_accordion">
|
||||
<div class="accordion-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-crosshair"><circle cx="12" cy="12" r="10"></circle><line x1="22" y1="12" x2="18" y2="12"></line><line x1="6" y1="12" x2="2" y2="12"></line><line x1="12" y1="6" x2="12" y2="2"></line><line x1="12" y1="22" x2="12" y2="18"></line></svg></div>
|
||||
Bug Bounty (Hackerone) (Optional) <div class="icons"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><polyline points="6 9 12 15 18 9"></polyline></svg></div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<div id="hackerone_accordion" class="collapse" aria-labelledby="headingOne4" data-parent="#hackerone_accordion">
|
||||
<div class="card-body">
|
||||
<div class="col-md-12 mb-4">
|
||||
<label for="domainDescription">Hackerone Target <b>team_handle</b>
|
||||
<br>
|
||||
This is used to send vulnerability reports to Hackerone Program automatically. Team handle can be found from program url, hackerone.com/team_handle
|
||||
</label>
|
||||
{{ form.h1_team_handle }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-primary submit-fn mt-2 float-right" type="submit">{{button_title}}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -44,7 +44,8 @@ Targets
|
||||
</div>
|
||||
<div class="col-xl-6 col-lg-6 col-md-6 col-sm-12 col-12">
|
||||
<a class="btn btn-soft-danger float-end disabled ms-1" href="#" onclick="deleteMultipleTargets()" id="delete_multiple_button">Delete Multiple Targets</a>
|
||||
<a class="btn btn-soft-info float-end disabled ms-1" href="#" onclick="scanMultipleTargets()" id="scan_multiple_button">Scan Multiple Targets</a>
|
||||
<a class="btn btn-soft-primary float-end disabled ms-1" href="#" onclick="scanMultipleTargets()" id="scan_multiple_button">Scan Multiple Targets</a>
|
||||
<a class="btn btn-soft-success float-end ms-1" href="{% url 'add_target' %}" data-toggle="tooltip" data-placement="top" title="Add New Targets">Add Targets</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,17 +7,52 @@ Update Target
|
||||
|
||||
|
||||
{% block custom_js_css_link %}
|
||||
<script src="{% static 'plugins/notification/snackbar/snackbar.min.js' %}"></script>
|
||||
<link href="{% static 'plugins/notification/snackbar/snackbar.min.css' %}" rel="stylesheet" type="text/css">
|
||||
<link href="{% static 'assets/css/components/tabs-accordian/custom-accordions.css' %}" rel="stylesheet" type="text/css" />
|
||||
{% endblock custom_js_css_link %}
|
||||
|
||||
{% block page_title %}
|
||||
Update Target {{ form.name.value }}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block main_content %}
|
||||
{% include 'target/_items/domain_form.html' with button_title="Update" widget_title="Update Target" form_action="update" %}
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title">Update Target</h4>
|
||||
<form method="POST">
|
||||
{% csrf_token %}
|
||||
<div class="row mb-3">
|
||||
<div class="col-6">
|
||||
<div>
|
||||
<label for="simpleinput" class="form-label">Domain name</label>
|
||||
{{ form.name }}
|
||||
{% if form.errors %}
|
||||
<div class="invalid-feedback" style="display: block;">
|
||||
{{ form.errors.name|striptags }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<label for="domainDescription" class="form-label">Description (Optional)</label>
|
||||
{{ form.description }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<label for="domainDescription" class="form-label">Hackerone Target Team Handle
|
||||
<br>
|
||||
This is used to send vulnerability reports to Hackerone Program automatically. Team handle can be found from program url, hackerone.com/team_handle
|
||||
</label>
|
||||
{{ form.h1_team_handle }}
|
||||
</div>
|
||||
<button class="btn btn-primary submit-fn mt-2 float-end" type="submit">Update Target</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock main_content %}
|
||||
|
||||
|
||||
{% block page_level_script %}
|
||||
<script src="{% static 'assets/js/scrollspyNav.js' %}"></script>
|
||||
<script src="{% static 'assets/js/components/ui-accordions.js' %}"></script>
|
||||
{% endblock page_level_script %}
|
||||
|
||||
Reference in New Issue
Block a user