[FEATURE] -maxtime
maximum testing time per host (soft kill) and -jsonl writes directly to disk
#5823
Labels
Type: Enhancement
Most issues will probably ask for additions or changes.
Describe your feature request
On rare occasions nuclei hangs and doesn't stop the process. This is very inconvenient for unattended runs. I supply a hardkill switch simply by running nuclei with prefixed
timeout 600
for example. However, this is not a neat way of doing things, as it hard kills the process and all previous findings and output is lost this way.-mt, -max-time int sets maximum runtime before nuclei auto-stops (example -mt 1d)
The security scanner Nikto.pl had an
-maxtime
option for 'Maximum testing time per host' effectively a soft-kill, which stopped the scan after the maximum time was hit and saving the output to disk. For example mid-scan the following would happen and the process would gracefully close after writing the output:I would like a
-maxtime
option for nuclei too to achieve this.In addition I think the behaviour of
-jsonl
should be changed too. Because the JSONLines format is perfect for directly writing each finding to disk when it's known instead of keeping it in memory. This way even if a process is hard killed the findings, up to that moment are still saved in the jsonl file.Describe the use case of the feature
See previous description. In essence long running scans with hanging processes.
Describe alternatives you've considered
See description above. Hard-kill and different behaviour of
-jsonl
.Additional context
No response
The text was updated successfully, but these errors were encountered: