nuclei
nuclei copied to clipboard
nuclei should not fail silently
I ran into an issue where my template was clearly not executed for no apparent reasons (https://github.com/projectdiscovery/nuclei/discussions/2062)
It turns out the template was not run after reaching too many errors.
I found this out using the -stats flag and my workaround was to use the -max-host-error flag with a high value.
I believe when the max-host-error limit is reached (default 30) there should be a clear error message.
Related #1166, #2012
@xm1k3 we can include skipped host information as part of -elog option.
{
"host": "http://asdsadsadagoogle.coms",
"error": "no address found for host",
"skipped": true
}
Depends on https://github.com/projectdiscovery/nuclei/issues/3046
@ehsandeep if the host is skipped due to reaching the maximum number of failed attempts, we wouldn't even try to connect to it. The error message is already in place at https://github.com/projectdiscovery/nuclei/blob/e033b53115f279b1a41c77a7894e0f9dd5025612/v2/pkg/protocols/common/hosterrorscache/hosterrorscache.go#L104 not sure what would be the best way to make it more visible, since it requires the verbose flag to be shown.
@Techbrunch if you are interested to learn about hosts that are skipped or errored out, you can always use -elog option to write the errored host to file and looks for them with cat nuclei_errors | jq .input, skipped hosts are also printed when running with verbose mode, but that info can't be printed on default run as there are multiple hosts goes though nuclei and will make default output nonreadable.
I disagree. Why would it be nonreadable ? I mean this should not happen usually right ? So I expect that this error would come up only for a low percentage of hosts unless you send garbage hosts data to nuclei no ?
If nothing changed since I opened this issue it means that nuclei fails silently which should not happen in my opinion.
@Techbrunch fixed with https://github.com/projectdiscovery/nuclei/pull/3123
@Techbrunch follow up issue to disable this feature - https://github.com/projectdiscovery/nuclei/issues/3138