From 9a0ce60a4f439b6eccc0ea828b5364a302bed888 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 2 Dec 2021 10:59:29 +0000 Subject: [PATCH] Auto Generate Syntax Docs + JSONSchema [Thu Dec 2 10:59:29 UTC 2021] :robot: --- SYNTAX-REFERENCE.md | 13 +++++++++++++ nuclei-jsonschema.json | 5 +++++ v2/pkg/templates/templates_doc.go | 7 ++++++- 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/SYNTAX-REFERENCE.md b/SYNTAX-REFERENCE.md index dbe55e89..0d39e7fd 100755 --- a/SYNTAX-REFERENCE.md +++ b/SYNTAX-REFERENCE.md @@ -1220,6 +1220,19 @@ SkipVariablesCheck skips the check for unresolved variables in request
+
+ +iterate-all bool + +
+
+ +IterateAll iterates all the values extracted from internal extractors + +
+ +
+ diff --git a/nuclei-jsonschema.json b/nuclei-jsonschema.json index aa84681b..a2beba2c 100755 --- a/nuclei-jsonschema.json +++ b/nuclei-jsonschema.json @@ -780,6 +780,11 @@ "type": "boolean", "title": "skip variable checks", "description": "Skips the check for unresolved variables in request" + }, + "iterate-all": { + "type": "boolean", + "title": "iterate all the values", + "description": "Iterates all the values extracted from internal extractors" } }, "additionalProperties": false, diff --git a/v2/pkg/templates/templates_doc.go b/v2/pkg/templates/templates_doc.go index d706d495..6f21ce82 100644 --- a/v2/pkg/templates/templates_doc.go +++ b/v2/pkg/templates/templates_doc.go @@ -282,7 +282,7 @@ func init() { FieldName: "requests", }, } - HTTPRequestDoc.Fields = make([]encoder.Doc, 26) + HTTPRequestDoc.Fields = make([]encoder.Doc, 27) HTTPRequestDoc.Fields[0].Name = "matchers" HTTPRequestDoc.Fields[0].Type = "[]matchers.Matcher" HTTPRequestDoc.Fields[0].Note = "" @@ -442,6 +442,11 @@ func init() { HTTPRequestDoc.Fields[25].Note = "" HTTPRequestDoc.Fields[25].Description = "SkipVariablesCheck skips the check for unresolved variables in request" HTTPRequestDoc.Fields[25].Comments[encoder.LineComment] = "SkipVariablesCheck skips the check for unresolved variables in request" + HTTPRequestDoc.Fields[26].Name = "iterate-all" + HTTPRequestDoc.Fields[26].Type = "bool" + HTTPRequestDoc.Fields[26].Note = "" + HTTPRequestDoc.Fields[26].Description = "IterateAll iterates all the values extracted from internal extractors" + HTTPRequestDoc.Fields[26].Comments[encoder.LineComment] = "IterateAll iterates all the values extracted from internal extractors" MATCHERSMatcherDoc.Type = "matchers.Matcher" MATCHERSMatcherDoc.Comments[encoder.LineComment] = " Matcher is used to match a part in the output from a protocol."