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

Add prompt to clarify parameter as template list instead of file #4133

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

f1ndr
Copy link

@f1ndr f1ndr commented Sep 9, 2023

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.
image

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).
image

Checklist

  • Pull request is created against the dev branch
  • All checks passed (lint, unit/integration/regression tests etc.) with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant