diff --git a/SYNTAX-REFERENCE.md b/SYNTAX-REFERENCE.md index 1afaa788..c03cd6b3 100755 --- a/SYNTAX-REFERENCE.md +++ b/SYNTAX-REFERENCE.md @@ -2450,6 +2450,35 @@ Inputs contains inputs for the network socket
+port string + +
+
+ +description: | + Port is the port to send network requests to. this acts as default port but is overriden if target/input contains + non-http(s) ports like 80,8080,8081 etc + +
+ +
+ +
+ +exclude-ports string + +
+
+ +description: | + ExcludePorts is the list of ports to exclude from being scanned . It is intended to be used with `Port` field and contains a list of ports which are ignored/skipped + +
+ +
+ +
+ read-size int
diff --git a/nuclei-jsonschema.json b/nuclei-jsonschema.json index 723f06f8..d5041df8 100644 --- a/nuclei-jsonschema.json +++ b/nuclei-jsonschema.json @@ -1134,6 +1134,16 @@ "title": "inputs for the network request", "description": "Inputs contains any input/output for the current request" }, + "port": { + "type": "string", + "title": "port to send requests to", + "description": "Port to send network requests to" + }, + "exclude-ports": { + "type": "string", + "title": "exclude ports from being scanned", + "description": "Exclude ports from being scanned" + }, "read-size": { "type": "integer", "title": "size of network response to read", diff --git a/v2/pkg/templates/templates_doc.go b/v2/pkg/templates/templates_doc.go index e093fe88..37859049 100644 --- a/v2/pkg/templates/templates_doc.go +++ b/v2/pkg/templates/templates_doc.go @@ -1079,7 +1079,7 @@ func init() { Value: "Full Network protocol data", }, } - NETWORKRequestDoc.Fields = make([]encoder.Doc, 7) + NETWORKRequestDoc.Fields = make([]encoder.Doc, 9) NETWORKRequestDoc.Fields[0].Name = "id" NETWORKRequestDoc.Fields[0].Type = "string" NETWORKRequestDoc.Fields[0].Note = "" @@ -1107,20 +1107,30 @@ func init() { NETWORKRequestDoc.Fields[4].Note = "" NETWORKRequestDoc.Fields[4].Description = "Inputs contains inputs for the network socket" NETWORKRequestDoc.Fields[4].Comments[encoder.LineComment] = "Inputs contains inputs for the network socket" - NETWORKRequestDoc.Fields[5].Name = "read-size" - NETWORKRequestDoc.Fields[5].Type = "int" + NETWORKRequestDoc.Fields[5].Name = "port" + NETWORKRequestDoc.Fields[5].Type = "string" NETWORKRequestDoc.Fields[5].Note = "" - NETWORKRequestDoc.Fields[5].Description = "ReadSize is the size of response to read at the end\n\nDefault value for read-size is 1024." - NETWORKRequestDoc.Fields[5].Comments[encoder.LineComment] = "ReadSize is the size of response to read at the end" - - NETWORKRequestDoc.Fields[5].AddExample("", 2048) - NETWORKRequestDoc.Fields[6].Name = "read-all" - NETWORKRequestDoc.Fields[6].Type = "bool" + NETWORKRequestDoc.Fields[5].Description = "description: |\n Port is the port to send network requests to. this acts as default port but is overriden if target/input contains\n non-http(s) ports like 80,8080,8081 etc" + NETWORKRequestDoc.Fields[5].Comments[encoder.LineComment] = " description: |" + NETWORKRequestDoc.Fields[6].Name = "exclude-ports" + NETWORKRequestDoc.Fields[6].Type = "string" NETWORKRequestDoc.Fields[6].Note = "" - NETWORKRequestDoc.Fields[6].Description = "ReadAll determines if the data stream should be read till the end regardless of the size\n\nDefault value for read-all is false." - NETWORKRequestDoc.Fields[6].Comments[encoder.LineComment] = "ReadAll determines if the data stream should be read till the end regardless of the size" + NETWORKRequestDoc.Fields[6].Description = "description: |\n ExcludePorts is the list of ports to exclude from being scanned . It is intended to be used with `Port` field and contains a list of ports which are ignored/skipped" + NETWORKRequestDoc.Fields[6].Comments[encoder.LineComment] = " description: |" + NETWORKRequestDoc.Fields[7].Name = "read-size" + NETWORKRequestDoc.Fields[7].Type = "int" + NETWORKRequestDoc.Fields[7].Note = "" + NETWORKRequestDoc.Fields[7].Description = "ReadSize is the size of response to read at the end\n\nDefault value for read-size is 1024." + NETWORKRequestDoc.Fields[7].Comments[encoder.LineComment] = "ReadSize is the size of response to read at the end" - NETWORKRequestDoc.Fields[6].AddExample("", false) + NETWORKRequestDoc.Fields[7].AddExample("", 2048) + NETWORKRequestDoc.Fields[8].Name = "read-all" + NETWORKRequestDoc.Fields[8].Type = "bool" + NETWORKRequestDoc.Fields[8].Note = "" + NETWORKRequestDoc.Fields[8].Description = "ReadAll determines if the data stream should be read till the end regardless of the size\n\nDefault value for read-all is false." + NETWORKRequestDoc.Fields[8].Comments[encoder.LineComment] = "ReadAll determines if the data stream should be read till the end regardless of the size" + + NETWORKRequestDoc.Fields[8].AddExample("", false) NETWORKInputDoc.Type = "network.Input" NETWORKInputDoc.Comments[encoder.LineComment] = ""