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

New filter to run / exclude templates by IDs #1442

Closed
ehsandeep opened this issue Jan 1, 2022 · 1 comment · Fixed by #1448
Closed

New filter to run / exclude templates by IDs #1442

ehsandeep opened this issue Jan 1, 2022 · 1 comment · Fixed by #1448
Assignees
Labels
Priority: Medium This issue may be useful, and needs some attention. Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Enhancement Most issues will probably ask for additions or changes.
Milestone

Comments

@ehsandeep
Copy link
Member

ehsandeep commented Jan 1, 2022

Describe the use case of this feature:

Nuclei templates begin with the id attribute, which is the most common information to remember. Currently, if we wanted to run any specific template, the -t flag can be used, which accepts the template path, which is harder to recall. Instead, we can use Template ID, where the path is not required to run the template, and the most common use case of this new flag would be running a specific CVE for the given template ID.

Multiple templates with the same ID will be executed/excluded using the same/single ID.

Please describe your feature request:

Flags:

FILTERING:
   -id, -template-id string    List of template IDs to run (comma-separated, file)
   -eid, -exclude-id string    List of template IDs to exclude (comma-separated, file)

Example run:

nuclei -id CVE-2021-43798 # Running template with the specific template ID
nuclei -id tech-detect,apache-config # Running multiple templates using comma-separated IDs
nuclei -id ids.txt # Running multiple templates using file input containing IDs per line
$ cat ids.txt

tech-detect
apache-config
nuclei -eid cve-2021-43798 # Excluding template with the specific template ID
nuclei -eid tech-detect,apache-config # Excluding multiple templates using comma-separated IDs
nuclei -eid ids.txt # Excluding multiple templates using file input containing IDs per line

Note:

id flag inputs are case insensitive, CVE-2021-43798,TECH-DETECT is same as cve-2021-43798,tech-detect

@ehsandeep ehsandeep added Type: Enhancement Most issues will probably ask for additions or changes. Priority: Medium This issue may be useful, and needs some attention. labels Jan 1, 2022
@Mzack9999 Mzack9999 self-assigned this Jan 3, 2022
@Mzack9999 Mzack9999 linked a pull request Jan 3, 2022 that will close this issue
4 tasks
@Mzack9999 Mzack9999 added the Status: Review Needed The issue has a PR attached to it which needs to be reviewed label Jan 3, 2022
@ehsandeep ehsandeep added Status: Completed Nothing further to be done with this issue. Awaiting to be closed. and removed Status: Review Needed The issue has a PR attached to it which needs to be reviewed labels Jan 7, 2022
@ehsandeep ehsandeep added this to the 2.5.8 milestone Jan 13, 2022
@aviadavi
Copy link

can we put commend next to the template id ?

tls-sni-proxy    # This is example 1
some-other-id # This is example 2

I see it's not working. it will be very helpful to ignore comments so we can comment on why we added it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Medium This issue may be useful, and needs some attention. Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants