Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix uninitialised variable cmd in custom_subdomain_tools #1207

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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