diff --git a/web/reNgine/tasks.py b/web/reNgine/tasks.py index 616fe5594..b1e185d28 100644 --- a/web/reNgine/tasks.py +++ b/web/reNgine/tasks.py @@ -472,6 +472,8 @@ 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 @@ -479,8 +481,7 @@ def subdomain_discovery( 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