Skip to content

Commit 49e8a5b

Browse files
committed
Add Queue to Lorsrf
1 parent c9fa9bc commit 49e8a5b

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

modules/python/lorsrf/lorsrf.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
from modules.python.sqli import main as sqli_main
1515
from modules.python.ssrf import main as ssrf_main
1616
from modules.python.ssti import main as ssti_main
17+
from queue import Queue
18+
from threading import Thread
1719

1820
log = getLogger('scant3r')
1921

@@ -26,12 +28,30 @@ class Lorsrf(Scan):
2628
def __init__(self, opts: dict, http: Http):
2729
self.oob_host = OOB(http)
2830
self.host = self.oob_host.new()
31+
self.queue = Queue()
2932
super().__init__(opts, http)
3033

31-
def start(self):
34+
def guess(self):
35+
urls = []
3236
for url in self.make_params():
33-
self.sender(url)
37+
urls.append(url)
38+
for url in urls:
39+
self.queue.put(url)
40+
3441
log.debug(f'Started on {self.opts["url"]} with 10 parameters per secound ({self.opts["methods"]})')
42+
self.queue.join()
43+
44+
def threader(self):
45+
while True:
46+
item = self.queue.get()
47+
self.sender(item)
48+
self.queue.task_done()
49+
50+
def start(self):
51+
thread = Thread(target=self.threader)
52+
thread.daemon = True
53+
thread.start()
54+
self.guess()
3555

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

0 commit comments

Comments
 (0)