Skip to content

Commit

Permalink
Merge pull request #1207 from cpandya2909/master
Browse files Browse the repository at this point in the history
Fix uninitialised variable cmd in custom_subdomain_tools
  • Loading branch information
yogeshojha authored Apr 18, 2024
2 parents f280647 + 4c0e38d commit a59060f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions web/reNgine/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,15 +472,16 @@ def subdomain_discovery(
if not tool_query.exists():
logger.error(f'{tool} configuration does not exists. Skipping.')
continue
custom_tool = tool_query.first()
cmd = custom_tool.subdomain_gathering_command
if '{TARGET}' not in cmd:
logger.error(f'Missing {{TARGET}} placeholders in {tool} configuration. Skipping.')
continue
if '{OUTPUT}' not in cmd:
logger.error(f'Missing {{OUTPUT}} placeholders in {tool} configuration. Skipping.')
continue

custom_tool = tool_query.first()
cmd = custom_tool.subdomain_gathering_command

cmd = cmd.replace('{TARGET}', host)
cmd = cmd.replace('{OUTPUT}', f'{self.results_dir}/subdomains_{tool}.txt')
cmd = cmd.replace('{PATH}', custom_tool.github_clone_path) if '{PATH}' in cmd else cmd
Expand Down

0 comments on commit a59060f

Please sign in to comment.