nuclei icon indicating copy to clipboard operation
nuclei copied to clipboard

Add CLI flag to list templates that were run in the scan

Open PatrikHudak opened this issue 3 years ago • 6 comments

Please describe your feature request:

Nuclei current supports -vv flag to list templates loaded for scan. It would be great, if there is an additional flag which would show templates that were actually used in the scan. For instance -mhe flag might cut scan after 30% loaded - I would like to know, which templates actually run, not were only loaded (prepared).

Describe the use case of this feature:

Mainly for audit and logging purposes. I like to keep track of targets and scan history.

Thanks.

PatrikHudak avatar Jun 21 '22 19:06 PatrikHudak

@PatrikHudak tried below option?

   -tlog, -trace-log string  file to write sent requests trace log

Output example:

{
  "template": "example.yaml",
  "input": "https://XXXX",
  "error": "none",
  "type": "http"
}

ehsandeep avatar Jun 21 '22 19:06 ehsandeep

@ehsandeep what about request clustering in this case? Wouldn't clustered templates be skipped?

PatrikHudak avatar Jun 21 '22 19:06 PatrikHudak

It will be skipped, the other option where it will be logged as part of JOSN output is using the below option:

   -ms, -matcher-status          display match failure status

ehsandeep avatar Jun 21 '22 19:06 ehsandeep

So -ms, -matcher-status would include every template that was used in the scan, even if the scan ended early?

PatrikHudak avatar Jun 21 '22 19:06 PatrikHudak

So -ms, -matcher-status would include every template that was used in the scan, even if the scan ended early?

Yes, every template gets scanned, not sure what you exactly mean by even if the scan ended early? but generally results are written for the template/hosts that gets scanned.

ehsandeep avatar Jun 21 '22 19:06 ehsandeep

I meant mainly these factors (for early end):

  • -spm, -stop-at-first-path
  • timeout
  • -mhe
  • user interrupt

PatrikHudak avatar Jun 21 '22 19:06 PatrikHudak