mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2026-11-07 09:46:03 -10:00
The -stats percentage was requests sent against a total estimated before the scan: TotalRequests of each template after clustering, times the number of targets. The estimate leaves out workflows, whose requests are added while they run, counts a self-contained template once per target although it runs once, and doesn't follow stop-at-first-match or a template that runs once per origin. A scan could end at 108% or stop at 25%. The engine now counts tasks: one per template, cluster or workflow run on a target, and one per self-contained template. The total is known when the scan starts. A task is done when it runs, when -resume skips it, when its host is unresponsive, or when it repeats its origin. progress.TaskTracker is an optional interface that StatsTicker implements, so Progress and lib.StatsWriter don't change. The stats line shows Tasks: done/total and takes the percentage from it, and -sj and the metrics endpoint report tasks, totalTasks and the same percent.