Skip to content
This repository has been archived by the owner on Apr 27, 2023. It is now read-only.

Commit

Permalink
Add Queue to Lorsrf
Browse files Browse the repository at this point in the history
  • Loading branch information
knassar702 committed Oct 31, 2021
1 parent c9fa9bc commit 49e8a5b
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions modules/python/lorsrf/lorsrf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
from modules.python.sqli import main as sqli_main
from modules.python.ssrf import main as ssrf_main
from modules.python.ssti import main as ssti_main
from queue import Queue
from threading import Thread

log = getLogger('scant3r')

Expand All @@ -26,12 +28,30 @@ class Lorsrf(Scan):
def __init__(self, opts: dict, http: Http):
self.oob_host = OOB(http)
self.host = self.oob_host.new()
self.queue = Queue()
super().__init__(opts, http)

def start(self):
def guess(self):
urls = []
for url in self.make_params():
self.sender(url)
urls.append(url)
for url in urls:
self.queue.put(url)

log.debug(f'Started on {self.opts["url"]} with 10 parameters per secound ({self.opts["methods"]})')
self.queue.join()

def threader(self):
while True:
item = self.queue.get()
self.sender(item)
self.queue.task_done()

def start(self):
thread = Thread(target=self.threader)
thread.daemon = True
thread.start()
self.guess()

def sender(self, url: str,body : dict = {}):
for method in self.opts['methods']:
Expand Down

0 comments on commit 49e8a5b

Please sign in to comment.