feat: fixed output event for skipped hosts (#6415)

* feat: fixed output event for skipped hosts

* misc
This commit is contained in:
Ice3man 2025-08-22 20:25:07 +05:30 committed by GitHub
parent b4644af80a
commit 30e520754b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View File

@ -8,7 +8,6 @@ import (
"github.com/antchfx/htmlquery"
"github.com/antchfx/xmlquery"
dslRepo "github.com/projectdiscovery/dsl"
"github.com/projectdiscovery/gologger"
"github.com/projectdiscovery/nuclei/v3/pkg/operators/common/dsl"
"github.com/projectdiscovery/nuclei/v3/pkg/protocols/common/expressions"
@ -316,7 +315,7 @@ func (m *Matcher) ignoreErr(err error) bool {
if showDSLErr {
return false
}
if stringsutil.ContainsAny(err.Error(), "No parameter", dslRepo.ErrParsingArg.Error()) {
if stringsutil.ContainsAny(err.Error(), "No parameter", "error parsing argument value") {
return true
}
return false

View File

@ -295,6 +295,10 @@ func (w *StandardWriter) ResultCount() int {
// Write writes the event to file and/or screen.
func (w *StandardWriter) Write(event *ResultEvent) error {
if event.Error != "" && !w.matcherStatus {
return nil
}
// Enrich the result event with extra metadata on the template-path and url.
if event.TemplatePath != "" {
event.Template, event.TemplateURL = utils.TemplatePathURL(types.ToString(event.TemplatePath), types.ToString(event.TemplateID), event.TemplateVerifier)