diff --git a/SYNTAX-REFERENCE.md b/SYNTAX-REFERENCE.md index c448d251d..6d1d9effc 100755 --- a/SYNTAX-REFERENCE.md +++ b/SYNTAX-REFERENCE.md @@ -3223,6 +3223,19 @@ read-all: false
+
+ +stop-at-first-match bool + +
+
+ +StopAtFirstMatch stops the execution of the requests and template as soon as a match is found. + +
+ +
+ diff --git a/nuclei-jsonschema.json b/nuclei-jsonschema.json index 8a8d5dd1b..97477e1f7 100644 --- a/nuclei-jsonschema.json +++ b/nuclei-jsonschema.json @@ -1370,6 +1370,11 @@ "title": "read all response stream", "description": "Read all response stream till the server stops sending" }, + "stop-at-first-match": { + "type": "boolean", + "title": "stop at first match", + "description": "Stop the execution after a match is found" + }, "matchers": { "items": { "$ref": "#/$defs/matchers.Matcher" diff --git a/pkg/templates/templates_doc.go b/pkg/templates/templates_doc.go index 9a7fc97a3..9bf754e24 100644 --- a/pkg/templates/templates_doc.go +++ b/pkg/templates/templates_doc.go @@ -1334,7 +1334,7 @@ func init() { Value: "Full Network protocol data", }, } - NETWORKRequestDoc.Fields = make([]encoder.Doc, 10) + NETWORKRequestDoc.Fields = make([]encoder.Doc, 11) NETWORKRequestDoc.Fields[0].Name = "id" NETWORKRequestDoc.Fields[0].Type = "string" NETWORKRequestDoc.Fields[0].Note = "" @@ -1393,6 +1393,11 @@ func init() { NETWORKRequestDoc.Fields[9].Comments[encoder.LineComment] = "ReadAll determines if the data stream should be read till the end regardless of the size" NETWORKRequestDoc.Fields[9].AddExample("", false) + NETWORKRequestDoc.Fields[10].Name = "stop-at-first-match" + NETWORKRequestDoc.Fields[10].Type = "bool" + NETWORKRequestDoc.Fields[10].Note = "" + NETWORKRequestDoc.Fields[10].Description = "StopAtFirstMatch stops the execution of the requests and template as soon as a match is found." + NETWORKRequestDoc.Fields[10].Comments[encoder.LineComment] = "StopAtFirstMatch stops the execution of the requests and template as soon as a match is found." NETWORKInputDoc.Type = "network.Input" NETWORKInputDoc.Comments[encoder.LineComment] = ""