diff --git a/SYNTAX-REFERENCE.md b/SYNTAX-REFERENCE.md
index 5ca82edaa..a1ebbc87e 100755
--- a/SYNTAX-REFERENCE.md
+++ b/SYNTAX-REFERENCE.md
@@ -247,6 +247,19 @@ Websocket contains the Websocket request to make in the template.
+
+
+WHOIS contains the WHOIS request to make in the template.
+
+
+
+
+
+
@@ -1320,6 +1333,8 @@ Appears in:
- websocket.Request.matchers
+- whois.Request.matchers
+
@@ -1713,6 +1728,8 @@ Appears in:
- websocket.Request.extractors
+- whois.Request.extractors
+
@@ -3599,6 +3616,106 @@ name: prefix
+## whois.Request
+Request is a request for the WHOIS protocol
+
+Appears in:
+
+
+- Template.whois
+
+
+
+
+
+
+
+
+
+
+Matchers contains the detection mechanism for the request to identify
+whether the request was successful by doing pattern matching
+on request/responses.
+
+Multiple matchers can be combined with `matcher-condition` flag
+which accepts either `and` or `or` as argument.
+
+
+
+
+
+
+
+
+Extractors contains the extraction mechanism for the request to identify
+and extract parts of the response.
+
+
+
+
+
+
+
+matchers-condition string
+
+
+
+
+MatchersCondition is the condition between the matchers. Default is OR.
+
+
+Valid values:
+
+
+ - and
+
+ - or
+
+
+
+
+
+
+query string
+
+
+
+
+Query contains query for the request
+
+
+
+
+
+
+
+server string
+
+
+
+
+description: |
+ Optional WHOIS server URL.
+
+ If present, specifies the WHOIS server to execute the Request on.
+ Otherwise, nil enables bootstrapping
+
+
+
+
+
+
+
+
+
## workflows.WorkflowTemplate
Appears in:
diff --git a/nuclei-jsonschema.json b/nuclei-jsonschema.json
index d7de55a24..c62995d4f 100755
--- a/nuclei-jsonschema.json
+++ b/nuclei-jsonschema.json
@@ -1026,6 +1026,47 @@
"additionalProperties": false,
"type": "object"
},
+ "whois.Request": {
+ "properties": {
+ "matchers": {
+ "items": {
+ "$ref": "#/definitions/matchers.Matcher"
+ },
+ "type": "array",
+ "title": "matchers to run on response",
+ "description": "Detection mechanism to identify whether the request was successful by doing pattern matching"
+ },
+ "extractors": {
+ "items": {
+ "$ref": "#/definitions/extractors.Extractor"
+ },
+ "type": "array",
+ "title": "extractors to run on response",
+ "description": "Extractors contains the extraction mechanism for the request to identify and extract parts of the response"
+ },
+ "matchers-condition": {
+ "enum": [
+ "and",
+ "or"
+ ],
+ "type": "string",
+ "title": "condition between the matchers",
+ "description": "Conditions between the matchers"
+ },
+ "query": {
+ "type": "string",
+ "title": "query for the WHOIS request",
+ "description": "Query contains query for the request"
+ },
+ "server": {
+ "type": "string",
+ "title": "server url to execute the WHOIS request on",
+ "description": "Server contains the server url to execute the WHOIS request on"
+ }
+ },
+ "additionalProperties": false,
+ "type": "object"
+ },
"templates.Template": {
"required": [
"id",
@@ -1110,6 +1151,15 @@
"title": "websocket requests to make",
"description": "Websocket requests to make for the template"
},
+ "whois": {
+ "items": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "$ref": "#/definitions/whois.Request"
+ },
+ "type": "array",
+ "title": "whois requests to make",
+ "description": "WHOIS requests to make for the template"
+ },
"workflows": {
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
diff --git a/v2/pkg/templates/templates_doc.go b/v2/pkg/templates/templates_doc.go
index a3adad887..962eba32c 100644
--- a/v2/pkg/templates/templates_doc.go
+++ b/v2/pkg/templates/templates_doc.go
@@ -33,6 +33,7 @@ var (
SSLRequestDoc encoder.Doc
WEBSOCKETRequestDoc encoder.Doc
WEBSOCKETInputDoc encoder.Doc
+ WHOISRequestDoc encoder.Doc
WORKFLOWSWorkflowTemplateDoc encoder.Doc
WORKFLOWSMatcherDoc encoder.Doc
)
@@ -41,7 +42,7 @@ func init() {
TemplateDoc.Type = "Template"
TemplateDoc.Comments[encoder.LineComment] = " Template is a YAML input file which defines all the requests and"
TemplateDoc.Description = "Template is a YAML input file which defines all the requests and\n other metadata for a template."
- TemplateDoc.Fields = make([]encoder.Doc, 12)
+ TemplateDoc.Fields = make([]encoder.Doc, 13)
TemplateDoc.Fields[0].Name = "id"
TemplateDoc.Fields[0].Type = "string"
TemplateDoc.Fields[0].Note = ""
@@ -99,21 +100,26 @@ func init() {
TemplateDoc.Fields[8].Note = ""
TemplateDoc.Fields[8].Description = "Websocket contains the Websocket request to make in the template."
TemplateDoc.Fields[8].Comments[encoder.LineComment] = "Websocket contains the Websocket request to make in the template."
- TemplateDoc.Fields[9].Name = "workflows"
- TemplateDoc.Fields[9].Type = "[]workflows.WorkflowTemplate"
+ TemplateDoc.Fields[9].Name = "whois"
+ TemplateDoc.Fields[9].Type = "[]whois.Request"
TemplateDoc.Fields[9].Note = ""
- TemplateDoc.Fields[9].Description = "Workflows is a list of workflows to execute for a template."
- TemplateDoc.Fields[9].Comments[encoder.LineComment] = "Workflows is a list of workflows to execute for a template."
- TemplateDoc.Fields[10].Name = "self-contained"
- TemplateDoc.Fields[10].Type = "bool"
+ TemplateDoc.Fields[9].Description = "WHOIS contains the WHOIS request to make in the template."
+ TemplateDoc.Fields[9].Comments[encoder.LineComment] = "WHOIS contains the WHOIS request to make in the template."
+ TemplateDoc.Fields[10].Name = "workflows"
+ TemplateDoc.Fields[10].Type = "[]workflows.WorkflowTemplate"
TemplateDoc.Fields[10].Note = ""
- TemplateDoc.Fields[10].Description = "Self Contained marks Requests for the template as self-contained"
- TemplateDoc.Fields[10].Comments[encoder.LineComment] = "Self Contained marks Requests for the template as self-contained"
- TemplateDoc.Fields[11].Name = "stop-at-first-match"
+ TemplateDoc.Fields[10].Description = "Workflows is a list of workflows to execute for a template."
+ TemplateDoc.Fields[10].Comments[encoder.LineComment] = "Workflows is a list of workflows to execute for a template."
+ TemplateDoc.Fields[11].Name = "self-contained"
TemplateDoc.Fields[11].Type = "bool"
TemplateDoc.Fields[11].Note = ""
- TemplateDoc.Fields[11].Description = "Stop execution once first match is found"
- TemplateDoc.Fields[11].Comments[encoder.LineComment] = "Stop execution once first match is found"
+ TemplateDoc.Fields[11].Description = "Self Contained marks Requests for the template as self-contained"
+ TemplateDoc.Fields[11].Comments[encoder.LineComment] = "Self Contained marks Requests for the template as self-contained"
+ TemplateDoc.Fields[12].Name = "stop-at-first-match"
+ TemplateDoc.Fields[12].Type = "bool"
+ TemplateDoc.Fields[12].Note = ""
+ TemplateDoc.Fields[12].Description = "Stop execution once first match is found"
+ TemplateDoc.Fields[12].Comments[encoder.LineComment] = "Stop execution once first match is found"
MODELInfoDoc.Type = "model.Info"
MODELInfoDoc.Comments[encoder.LineComment] = " Info contains metadata information about a template"
@@ -570,6 +576,10 @@ func init() {
TypeName: "websocket.Request",
FieldName: "matchers",
},
+ {
+ TypeName: "whois.Request",
+ FieldName: "matchers",
+ },
}
MATCHERSMatcherDoc.Fields = make([]encoder.Doc, 13)
MATCHERSMatcherDoc.Fields[0].Name = "type"
@@ -731,6 +741,10 @@ func init() {
TypeName: "websocket.Request",
FieldName: "extractors",
},
+ {
+ TypeName: "whois.Request",
+ FieldName: "extractors",
+ },
}
EXTRACTORSExtractorDoc.Fields = make([]encoder.Doc, 11)
EXTRACTORSExtractorDoc.Fields[0].Name = "name"
@@ -1645,6 +1659,46 @@ func init() {
WEBSOCKETInputDoc.Fields[1].AddExample("", "prefix")
+ WHOISRequestDoc.Type = "whois.Request"
+ WHOISRequestDoc.Comments[encoder.LineComment] = " Request is a request for the WHOIS protocol"
+ WHOISRequestDoc.Description = "Request is a request for the WHOIS protocol"
+ WHOISRequestDoc.AppearsIn = []encoder.Appearance{
+ {
+ TypeName: "Template",
+ FieldName: "whois",
+ },
+ }
+ WHOISRequestDoc.Fields = make([]encoder.Doc, 5)
+ WHOISRequestDoc.Fields[0].Name = "matchers"
+ WHOISRequestDoc.Fields[0].Type = "[]matchers.Matcher"
+ WHOISRequestDoc.Fields[0].Note = ""
+ WHOISRequestDoc.Fields[0].Description = "Matchers contains the detection mechanism for the request to identify\nwhether the request was successful by doing pattern matching\non request/responses.\n\nMultiple matchers can be combined with `matcher-condition` flag\nwhich accepts either `and` or `or` as argument."
+ WHOISRequestDoc.Fields[0].Comments[encoder.LineComment] = "Matchers contains the detection mechanism for the request to identify"
+ WHOISRequestDoc.Fields[1].Name = "extractors"
+ WHOISRequestDoc.Fields[1].Type = "[]extractors.Extractor"
+ WHOISRequestDoc.Fields[1].Note = ""
+ WHOISRequestDoc.Fields[1].Description = "Extractors contains the extraction mechanism for the request to identify\nand extract parts of the response."
+ WHOISRequestDoc.Fields[1].Comments[encoder.LineComment] = "Extractors contains the extraction mechanism for the request to identify"
+ WHOISRequestDoc.Fields[2].Name = "matchers-condition"
+ WHOISRequestDoc.Fields[2].Type = "string"
+ WHOISRequestDoc.Fields[2].Note = ""
+ WHOISRequestDoc.Fields[2].Description = "MatchersCondition is the condition between the matchers. Default is OR."
+ WHOISRequestDoc.Fields[2].Comments[encoder.LineComment] = "MatchersCondition is the condition between the matchers. Default is OR."
+ WHOISRequestDoc.Fields[2].Values = []string{
+ "and",
+ "or",
+ }
+ WHOISRequestDoc.Fields[3].Name = "query"
+ WHOISRequestDoc.Fields[3].Type = "string"
+ WHOISRequestDoc.Fields[3].Note = ""
+ WHOISRequestDoc.Fields[3].Description = "Query contains query for the request"
+ WHOISRequestDoc.Fields[3].Comments[encoder.LineComment] = "Query contains query for the request"
+ WHOISRequestDoc.Fields[4].Name = "server"
+ WHOISRequestDoc.Fields[4].Type = "string"
+ WHOISRequestDoc.Fields[4].Note = ""
+ WHOISRequestDoc.Fields[4].Description = "description: |\n Optional WHOIS server URL.\n\n If present, specifies the WHOIS server to execute the Request on.\n Otherwise, nil enables bootstrapping"
+ WHOISRequestDoc.Fields[4].Comments[encoder.LineComment] = " description: |"
+
WORKFLOWSWorkflowTemplateDoc.Type = "workflows.WorkflowTemplate"
WORKFLOWSWorkflowTemplateDoc.Comments[encoder.LineComment] = ""
WORKFLOWSWorkflowTemplateDoc.Description = ""
@@ -1740,6 +1794,7 @@ func GetTemplateDoc() *encoder.FileDoc {
&SSLRequestDoc,
&WEBSOCKETRequestDoc,
&WEBSOCKETInputDoc,
+ &WHOISRequestDoc,
&WORKFLOWSWorkflowTemplateDoc,
&WORKFLOWSMatcherDoc,
},