Skip to content

Commit 7abaae3

Browse files
committed
fix typos for excluded paths
1 parent fa761a7 commit 7abaae3

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

web/reNgine/common_func.py

+1
Original file line numberDiff line numberDiff line change
@@ -1173,6 +1173,7 @@ def exclude_urls_by_patterns(exclude_paths, urls):
11731173
Returns:
11741174
list of str: A new list containing URLs that don't match any exclusion pattern.
11751175
"""
1176+
logger.info('exclude_urls_by_patterns')
11761177
if not exclude_paths:
11771178
# if no exclude paths are passed and is empty list return all urls as it is
11781179
return urls

web/reNgine/tasks.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -2839,14 +2839,9 @@ def http_crawl(
28392839
input_path = f'{self.results_dir}/httpx_input.txt'
28402840
history_file = f'{self.results_dir}/commands.txt'
28412841
if urls: # direct passing URLs to check
2842-
print(vars(self).items())
28432842
if self.starting_point_url:
28442843
urls = [u for u in urls if self.starting_point_url in u]
28452844

2846-
# exclude urls by pattern
2847-
if self.excluded_paths:
2848-
urls = exclude_urls_by_patterns(self.excluded_paths, urls)
2849-
28502845
with open(input_path, 'w') as f:
28512846
f.write('\n'.join(urls))
28522847
else:
@@ -2857,6 +2852,10 @@ def http_crawl(
28572852
)
28582853
# logger.debug(urls)
28592854

2855+
# exclude urls by pattern
2856+
if self.excluded_paths:
2857+
urls = exclude_urls_by_patterns(self.excluded_paths, urls)
2858+
28602859
# If no URLs found, skip it
28612860
if not urls:
28622861
return

web/startScan/views.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,10 @@ def start_scan_ui(request, slug, domain_id):
260260
subdomains_out = request.POST['outOfScopeSubdomainTextarea'].split()
261261
subdomains_out = [s.rstrip() for s in subdomains_out if s]
262262
starting_point_url = request.POST['startingPointUrl'].strip()
263-
excluded_paths = request.POST['excludedPaths']
263+
excluded_paths = request.POST['excludedPaths'] # string separated by ,
264+
265+
# split excluded paths by ,
266+
excluded_paths = [path.strip() for path in excluded_paths.split(',')]
264267

265268
# Get engine type
266269
engine_id = request.POST['scan_mode']

0 commit comments

Comments
 (0)