Skip to content

Commit

Permalink
Merge pull request #1005 from psyray/fix-missing-slug-scanEngine-v2
Browse files Browse the repository at this point in the history
Add all the missing slug in scanEngine view & other places
  • Loading branch information
yogeshojha authored Oct 24, 2023
2 parents 6acce45 + ec771cf commit cd9c31e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
</a>
<div class="dropdown-menu dropdown-menu-end" style="">
<a class="dropdown-item" href="javascript:uninstall_tool({{tool.id}}, '{{tool.name}}')">Uninstall Tool</a>
<a class="dropdown-item" href="{% url 'update_tool_in_arsenal' tool.id %}">Modify Tool</a>
<a class="dropdown-item" href="{% url 'update_tool_in_arsenal' current_project.slug tool.id %}">Modify Tool</a>
</div>
</div>
{% endif %}
Expand Down
22 changes: 11 additions & 11 deletions web/scanEngine/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def tool_specific_settings(request, slug):
file.write(gf_file.read().decode("utf-8"))
file.close()
messages.add_message(request, messages.INFO, 'Pattern {} successfully uploaded'.format(gf_file.name[:4]))
return http.HttpResponseRedirect(reverse('tool_settings'))
return http.HttpResponseRedirect(reverse('tool_settings', kwargs={'slug': slug}))

elif 'nucleiFileUpload' in request.FILES:
nuclei_file = request.FILES['nucleiFileUpload']
Expand All @@ -225,37 +225,37 @@ def tool_specific_settings(request, slug):
file.write(nuclei_file.read().decode("utf-8"))
file.close()
messages.add_message(request, messages.INFO, 'Nuclei Pattern {} successfully uploaded'.format(nuclei_file.name[:-5]))
return http.HttpResponseRedirect(reverse('tool_settings'))
return http.HttpResponseRedirect(reverse('tool_settings', kwargs={'slug': slug}))

elif 'nuclei_config_text_area' in request.POST:
with open('/root/.config/nuclei/config.yaml', "w") as fhandle:
fhandle.write(request.POST.get('nuclei_config_text_area'))
messages.add_message(request, messages.INFO, 'Nuclei config updated!')
return http.HttpResponseRedirect(reverse('tool_settings'))
return http.HttpResponseRedirect(reverse('tool_settings', kwargs={'slug': slug}))

elif 'subfinder_config_text_area' in request.POST:
with open('/root/.config/subfinder/config.yaml', "w") as fhandle:
fhandle.write(request.POST.get('subfinder_config_text_area'))
messages.add_message(request, messages.INFO, 'Subfinder config updated!')
return http.HttpResponseRedirect(reverse('tool_settings'))
return http.HttpResponseRedirect(reverse('tool_settings', kwargs={'slug': slug}))

elif 'naabu_config_text_area' in request.POST:
with open('/root/.config/naabu/config.yaml', "w") as fhandle:
fhandle.write(request.POST.get('naabu_config_text_area'))
messages.add_message(request, messages.INFO, 'Naabu config updated!')
return http.HttpResponseRedirect(reverse('tool_settings'))
return http.HttpResponseRedirect(reverse('tool_settings', kwargs={'slug': slug}))

elif 'amass_config_text_area' in request.POST:
with open('/root/.config/amass.ini', "w") as fhandle:
fhandle.write(request.POST.get('amass_config_text_area'))
messages.add_message(request, messages.INFO, 'Amass config updated!')
return http.HttpResponseRedirect(reverse('tool_settings'))
return http.HttpResponseRedirect(reverse('tool_settings', kwargs={'slug': slug}))

elif 'theharvester_config_text_area' in request.POST:
with open('/usr/src/github/theHarvester/api-keys.yaml', "w") as fhandle:
fhandle.write(request.POST.get('theharvester_config_text_area'))
messages.add_message(request, messages.INFO, 'theHarvester config updated!')
return http.HttpResponseRedirect(reverse('tool_settings'))
return http.HttpResponseRedirect(reverse('tool_settings', kwargs={'slug': slug}))

context['settings_nav_active'] = 'active'
context['tool_settings_li'] = 'active'
Expand Down Expand Up @@ -312,7 +312,7 @@ def notification_settings(request, slug):
request,
messages.INFO,
'Notification Settings updated successfully and test message was sent.')
return http.HttpResponseRedirect(reverse('notification_settings'))
return http.HttpResponseRedirect(reverse('notification_settings', kwargs={'slug': slug}))

context['settings_nav_active'] = 'active'
context['notification_settings_li'] = 'active'
Expand Down Expand Up @@ -347,7 +347,7 @@ def proxy_settings(request, slug):
request,
messages.INFO,
'Proxies updated.')
return http.HttpResponseRedirect(reverse('proxy_settings'))
return http.HttpResponseRedirect(reverse('proxy_settings', kwargs={'slug': slug}))
context['settings_nav_active'] = 'active'
context['proxy_settings_li'] = 'active'
context['settings_ul_show'] = 'show'
Expand Down Expand Up @@ -399,7 +399,7 @@ def hackerone_settings(request, slug):
request,
messages.INFO,
'Hackerone Settings updated.')
return http.HttpResponseRedirect(reverse('hackerone_settings'))
return http.HttpResponseRedirect(reverse('hackerone_settings', kwargs={'slug': slug}))
context['settings_nav_active'] = 'active'
context['hackerone_settings_li'] = 'active'
context['settings_ul_show'] = 'show'
Expand Down Expand Up @@ -437,7 +437,7 @@ def report_settings(request, slug):
request,
messages.INFO,
'Report Settings updated.')
return http.HttpResponseRedirect(reverse('report_settings'))
return http.HttpResponseRedirect(reverse('report_settings', kwargs={'slug': slug}))


context['settings_nav_active'] = 'active'
Expand Down
4 changes: 2 additions & 2 deletions web/templates/base/_items/top_bar.html
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,15 @@ <h6 class="text-overflow m-0">Welcome {{user.get_username}}!</h6>
</li>
</ul>
<div class="logo-box">
<a href="{% url 'dashboardIndex' 'default' %}" class="logo logo-dark text-center">
<a href="{% url 'dashboardIndex' current_project.slug %}" class="logo logo-dark text-center">
<span class="logo-sm">
<h3 class="text-logo vertical-center">reNgine&nbsp;<small>2.0.0</small></h3>
</span>
<span class="logo-lg">
<h3 class="text-logo vertical-center">reNgine&nbsp;<small>2.0.0</small></h3>
</span>
</a>
<a href="{% url 'dashboardIndex' 'default' %}" class="logo logo-light text-center">
<a href="{% url 'dashboardIndex' current_project.slug %}" class="logo logo-light text-center">
<span class="logo-sm">
<h3 class="text-sm-logo vertical-center">reNgine&nbsp;<small>2.0.0</small></h3>
</span>
Expand Down

0 comments on commit cd9c31e

Please sign in to comment.