Add prompt to clarify parameter as template list instead of file #4133
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit adds a prompt to inform users when their input is interpreted as a list of templates, rather than a single template file. This addresses potential confusion where a user may unknowingly pass a parameter intended to be a single template file but is treated as a list. The added message specifies that the file extension should be either yaml or json to be recognized as a single template file.
Proposed changes
Problem
Today is my first day using Nuclei. I ran into an issue when using a file with a .yml extension. The application threw an error (see screenshot). After spending considerable time debugging, I found out that Nuclei was treating my file as a list of templates rather than a single template file.
Solution
To address this, I've modified the code to add an info message. The new message informs the user that the application interprets their input as a list of templates. It also specifies that in order to be recognized as a single template file, the file extension should be either .yaml or .json (see screenshot).
Checklist