Skip to content

Commit c30037e

Browse files
committed
changes in lorsrf
1 parent f967657 commit c30037e

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

modules/python/lorsrf/lorsrf.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from urllib.parse import urlparse # url parsing
99
from logging import getLogger
1010
from wordlists import ssrf_parameters # ssrf parameters wordlist
11+
from core.libs import alert_bug
1112
from modules import Scan
1213
from modules.python.xss import main as xss_main
1314
from modules.python.xss_param import main as xss_param_main
@@ -22,8 +23,6 @@
2223
# send requests per sec
2324
parameters_in_one_request = 10
2425

25-
# parameters_in_one_request = 2
26-
2726
# ?ex1=http://google.com&ex2=http://google.com
2827

2928
class Lorsrf(Scan):
@@ -53,7 +52,7 @@ def lor(self, url: str):
5352
op = self.opts.copy()
5453
op['url'] = url
5554
op['method'] = method
56-
if self.opts['one_scan'] == True:
55+
if self.opts['one_scan'] == False:
5756
log.debug('Scannig with another modules')
5857
xss_main(op,self.http)
5958
xss_param_main(op,self.http)
@@ -69,11 +68,17 @@ def org(self) -> list:
6968
l = len(ssrf_parameters())
7069
newurl = self.opts['url']
7170
allu = []
71+
proto = ['http://','https://','smpt://','']
72+
if self.opts['host']:
73+
pass
74+
else:
75+
return
7276
for par in ssrf_parameters():
73-
pay = f"{self.opts['host']}/{par}"
74-
newurl += self.check_url(newurl, par, pay)
75-
if len(urlparse(newurl).query.split('=')) == parameters_in_one_request + 1:
76-
allu.append(newurl)
77-
newurl = self.opts['url']
77+
for pr in proto:
78+
pay = f"{pr}{par}.{self.opts['host']}"
79+
newurl += self.check_url(newurl, par, pay)
80+
if len(urlparse(newurl).query.split('=')) == parameters_in_one_request + 1:
81+
allu.append(newurl)
82+
newurl = self.opts['url']
7883
return allu
7984

0 commit comments

Comments
 (0)