Added reverse whois

This commit is contained in:
Yogesh Ojha
2023-04-13 01:32:46 +05:30
parent 11fc1aab46
commit ee6b0375e2
4 changed files with 85 additions and 23 deletions
+4
View File
@@ -134,6 +134,10 @@ urlpatterns = [
'tools/whois/',
Whois.as_view(),
name='whois'),
path(
'tools/reverse/whois/',
ReverseWhois.as_view(),
name='reverse_whois'),
path(
'tools/cms_detector/',
CMSDetector.as_view(),
+10 -1
View File
@@ -15,7 +15,7 @@ from reNgine.celery import app
from reNgine.common_func import *
from reNgine.definitions import ABORTED_TASK
from reNgine.tasks import (create_scan_activity, initiate_subscan, query_whois,
run_command, send_hackerone_report)
run_command, send_hackerone_report, query_reverse_whois)
from reNgine.utilities import is_safe_path
from rest_framework import viewsets
from rest_framework.response import Response
@@ -899,6 +899,15 @@ class Whois(APIView):
return Response(response)
class ReverseWhois(APIView):
def get(self, request):
req = self.request
lookup_keyword = req.query_params.get('lookup_keyword')
task = query_reverse_whois.apply_async(args=(lookup_keyword,))
response = task.wait()
return Response(response)
class CMSDetector(APIView):
def get(self, request):
req = self.request