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

Conversation

cpandya2909
Copy link
Contributor

custom tool for subdomain scanning is failing as it is failing to find {TARGET} in the run command even if it is properly defined in the web portal.

checking the logs showed that line

if '{TARGET}' not in cmd:

failed as cmd was None.

cmd is used here to check required values but it is defined after this check.

			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)

Thus, fixing the cmd variable initialisation.

@AnonymousWP AnonymousWP requested a review from psyray March 21, 2024 10:28
@yogeshojha
Copy link
Owner

Thank you for sending the fix @cpandya2909 🚀

@yogeshojha yogeshojha merged commit a59060f into yogeshojha:master Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants