@@ -3186,84 +2832,6 @@ Action is the type of the action to perform.
-## ActionTypeHolder
-ActionTypeHolder is used to hold internal type of the action
-
-Appears in:
-
-
--
-
-
-
-
-
## ssl.Request
Request is a request for the SSL protocol
@@ -3274,15 +2842,8 @@ Appears in:
-Part Definitions:
--
@@ -3364,16 +2925,8 @@ Appears in:
-Part Definitions:
--
type
- Type is the type of request made
--
success
- Success specifies whether websocket connection was successful
--
request
- Websocket request made to the server
--
response
- Websocket response recieved from the server
--
host
- Host is the input to the template
--
matched
- Matched is the input which was matched upon
-
diff --git a/v2/pkg/templates/templates_doc.go b/v2/pkg/templates/templates_doc.go
index bc15b308..d706d495 100644
--- a/v2/pkg/templates/templates_doc.go
+++ b/v2/pkg/templates/templates_doc.go
@@ -16,20 +16,14 @@ var (
MODELClassificationDoc encoder.Doc
HTTPRequestDoc encoder.Doc
MATCHERSMatcherDoc encoder.Doc
- MatcherTypeHolderDoc encoder.Doc
EXTRACTORSExtractorDoc encoder.Doc
- ExtractorTypeHolderDoc encoder.Doc
GENERATORSAttackTypeHolderDoc encoder.Doc
- HTTPMethodTypeHolderDoc encoder.Doc
DNSRequestDoc encoder.Doc
- DNSRequestTypeHolderDoc encoder.Doc
FILERequestDoc encoder.Doc
NETWORKRequestDoc encoder.Doc
NETWORKInputDoc encoder.Doc
- NetworkInputTypeHolderDoc encoder.Doc
HEADLESSRequestDoc encoder.Doc
ENGINEActionDoc encoder.Doc
- ActionTypeHolderDoc encoder.Doc
SSLRequestDoc encoder.Doc
WEBSOCKETRequestDoc encoder.Doc
WEBSOCKETInputDoc encoder.Doc
@@ -236,20 +230,7 @@ func init() {
FieldName: "severity",
},
}
- SEVERITYHolderDoc.Fields = make([]encoder.Doc, 1)
- SEVERITYHolderDoc.Fields[0].Name = ""
- SEVERITYHolderDoc.Fields[0].Type = "Severity"
- SEVERITYHolderDoc.Fields[0].Note = ""
- SEVERITYHolderDoc.Fields[0].Description = ""
- SEVERITYHolderDoc.Fields[0].Comments[encoder.LineComment] = ""
- SEVERITYHolderDoc.Fields[0].EnumFields = []string{
- "undefined",
- "info",
- "low",
- "medium",
- "high",
- "critical",
- }
+ SEVERITYHolderDoc.Fields = make([]encoder.Doc, 0)
MODELClassificationDoc.Type = "model.Classification"
MODELClassificationDoc.Comments[encoder.LineComment] = ""
@@ -301,72 +282,6 @@ func init() {
FieldName: "requests",
},
}
- HTTPRequestDoc.PartDefinitions = []encoder.KeyValue{
- {
- Key: "template-id",
- Value: "ID of the template executed",
- },
- {
- Key: "template-info",
- Value: "Info Block of the template executed",
- },
- {
- Key: "template-path",
- Value: "Path of the template executed",
- },
- {
- Key: "host",
- Value: "Host is the input to the template",
- },
- {
- Key: "matched",
- Value: "Matched is the input which was matched upon",
- },
- {
- Key: "type",
- Value: "Type is the type of request made",
- },
- {
- Key: "request",
- Value: "HTTP request made from the client",
- },
- {
- Key: "response",
- Value: "HTTP response recieved from server",
- },
- {
- Key: "status_code",
- Value: "Status Code received from the Server",
- },
- {
- Key: "body",
- Value: "HTTP response body received from server (default)",
- },
- {
- Key: "content_length",
- Value: "HTTP Response content length",
- },
- {
- Key: "header,all_headers",
- Value: "HTTP response headers",
- },
- {
- Key: "duration",
- Value: "HTTP request time duration",
- },
- {
- Key: "all",
- Value: "HTTP response body + headers",
- },
- {
- Key: "",
- Value: "HTTP response cookies in : format",
- },
- {
- Key: "",
- Value: "HTTP response headers in : format",
- },
- }
HTTPRequestDoc.Fields = make([]encoder.Doc, 26)
HTTPRequestDoc.Fields[0].Name = "matchers"
HTTPRequestDoc.Fields[0].Type = "[]matchers.Matcher"
@@ -665,30 +580,6 @@ func init() {
"true",
}
- MatcherTypeHolderDoc.Type = "MatcherTypeHolder"
- MatcherTypeHolderDoc.Comments[encoder.LineComment] = " MatcherTypeHolder is used to hold internal type of the matcher"
- MatcherTypeHolderDoc.Description = "MatcherTypeHolder is used to hold internal type of the matcher"
- MatcherTypeHolderDoc.AppearsIn = []encoder.Appearance{
- {
- TypeName: "matchers.Matcher",
- FieldName: "type",
- },
- }
- MatcherTypeHolderDoc.Fields = make([]encoder.Doc, 1)
- MatcherTypeHolderDoc.Fields[0].Name = ""
- MatcherTypeHolderDoc.Fields[0].Type = "MatcherType"
- MatcherTypeHolderDoc.Fields[0].Note = ""
- MatcherTypeHolderDoc.Fields[0].Description = ""
- MatcherTypeHolderDoc.Fields[0].Comments[encoder.LineComment] = ""
- MatcherTypeHolderDoc.Fields[0].EnumFields = []string{
- "word",
- "regex",
- "binary",
- "status",
- "size",
- "dsl",
- }
-
EXTRACTORSExtractorDoc.Type = "extractors.Extractor"
EXTRACTORSExtractorDoc.Comments[encoder.LineComment] = " Extractor is used to extract part of response using a regex."
EXTRACTORSExtractorDoc.Description = "Extractor is used to extract part of response using a regex."
@@ -803,28 +694,6 @@ func init() {
"true",
}
- ExtractorTypeHolderDoc.Type = "ExtractorTypeHolder"
- ExtractorTypeHolderDoc.Comments[encoder.LineComment] = " ExtractorTypeHolder is used to hold internal type of the extractor"
- ExtractorTypeHolderDoc.Description = "ExtractorTypeHolder is used to hold internal type of the extractor"
- ExtractorTypeHolderDoc.AppearsIn = []encoder.Appearance{
- {
- TypeName: "extractors.Extractor",
- FieldName: "type",
- },
- }
- ExtractorTypeHolderDoc.Fields = make([]encoder.Doc, 1)
- ExtractorTypeHolderDoc.Fields[0].Name = ""
- ExtractorTypeHolderDoc.Fields[0].Type = "ExtractorType"
- ExtractorTypeHolderDoc.Fields[0].Note = ""
- ExtractorTypeHolderDoc.Fields[0].Description = ""
- ExtractorTypeHolderDoc.Fields[0].Comments[encoder.LineComment] = ""
- ExtractorTypeHolderDoc.Fields[0].EnumFields = []string{
- "regex",
- "kval",
- "xpath",
- "json",
- }
-
GENERATORSAttackTypeHolderDoc.Type = "generators.AttackTypeHolder"
GENERATORSAttackTypeHolderDoc.Comments[encoder.LineComment] = " AttackTypeHolder is used to hold internal type of the protocol"
GENERATORSAttackTypeHolderDoc.Description = "AttackTypeHolder is used to hold internal type of the protocol"
@@ -842,45 +711,7 @@ func init() {
FieldName: "attack",
},
}
- GENERATORSAttackTypeHolderDoc.Fields = make([]encoder.Doc, 1)
- GENERATORSAttackTypeHolderDoc.Fields[0].Name = ""
- GENERATORSAttackTypeHolderDoc.Fields[0].Type = "AttackType"
- GENERATORSAttackTypeHolderDoc.Fields[0].Note = ""
- GENERATORSAttackTypeHolderDoc.Fields[0].Description = ""
- GENERATORSAttackTypeHolderDoc.Fields[0].Comments[encoder.LineComment] = ""
- GENERATORSAttackTypeHolderDoc.Fields[0].EnumFields = []string{
- "batteringram",
- "pitchfork",
- "clusterbomb",
- }
-
- HTTPMethodTypeHolderDoc.Type = "HTTPMethodTypeHolder"
- HTTPMethodTypeHolderDoc.Comments[encoder.LineComment] = " HTTPMethodTypeHolder is used to hold internal type of the HTTP Method"
- HTTPMethodTypeHolderDoc.Description = "HTTPMethodTypeHolder is used to hold internal type of the HTTP Method"
- HTTPMethodTypeHolderDoc.AppearsIn = []encoder.Appearance{
- {
- TypeName: "http.Request",
- FieldName: "method",
- },
- }
- HTTPMethodTypeHolderDoc.Fields = make([]encoder.Doc, 1)
- HTTPMethodTypeHolderDoc.Fields[0].Name = ""
- HTTPMethodTypeHolderDoc.Fields[0].Type = "HTTPMethodType"
- HTTPMethodTypeHolderDoc.Fields[0].Note = ""
- HTTPMethodTypeHolderDoc.Fields[0].Description = ""
- HTTPMethodTypeHolderDoc.Fields[0].Comments[encoder.LineComment] = ""
- HTTPMethodTypeHolderDoc.Fields[0].EnumFields = []string{
- "GET",
- "GET",
- "POST",
- "PUT",
- "DELETE",
- "CONNECT",
- "OPTIONS",
- "TRACE",
- "PATCH",
- "PURGE",
- }
+ GENERATORSAttackTypeHolderDoc.Fields = make([]encoder.Doc, 0)
DNSRequestDoc.Type = "dns.Request"
DNSRequestDoc.Comments[encoder.LineComment] = " Request contains a DNS protocol request to be made from a template"
@@ -893,64 +724,6 @@ func init() {
FieldName: "dns",
},
}
- DNSRequestDoc.PartDefinitions = []encoder.KeyValue{
- {
- Key: "template-id",
- Value: "ID of the template executed",
- },
- {
- Key: "template-info",
- Value: "Info Block of the template executed",
- },
- {
- Key: "template-path",
- Value: "Path of the template executed",
- },
- {
- Key: "host",
- Value: "Host is the input to the template",
- },
- {
- Key: "matched",
- Value: "Matched is the input which was matched upon",
- },
- {
- Key: "request",
- Value: "Request contains the DNS request in text format",
- },
- {
- Key: "type",
- Value: "Type is the type of request made",
- },
- {
- Key: "rcode",
- Value: "Rcode field returned for the DNS request",
- },
- {
- Key: "question",
- Value: "Question contains the DNS question field",
- },
- {
- Key: "extra",
- Value: "Extra contains the DNS response extra field",
- },
- {
- Key: "answer",
- Value: "Answer contains the DNS response answer field",
- },
- {
- Key: "ns",
- Value: "NS contains the DNS response NS field",
- },
- {
- Key: "raw,body,all",
- Value: "Raw contains the raw DNS response (default)",
- },
- {
- Key: "trace",
- Value: "Trace contains trace data for DNS request if enabled",
- },
- }
DNSRequestDoc.Fields = make([]encoder.Doc, 12)
DNSRequestDoc.Fields[0].Name = "matchers"
DNSRequestDoc.Fields[0].Type = "[]matchers.Matcher"
@@ -1031,33 +804,6 @@ func init() {
DNSRequestDoc.Fields[11].Description = "Resolvers to use for the dns requests"
DNSRequestDoc.Fields[11].Comments[encoder.LineComment] = " Resolvers to use for the dns requests"
- DNSRequestTypeHolderDoc.Type = "DNSRequestTypeHolder"
- DNSRequestTypeHolderDoc.Comments[encoder.LineComment] = " DNSRequestTypeHolder is used to hold internal type of the DNS type"
- DNSRequestTypeHolderDoc.Description = "DNSRequestTypeHolder is used to hold internal type of the DNS type"
- DNSRequestTypeHolderDoc.AppearsIn = []encoder.Appearance{
- {
- TypeName: "dns.Request",
- FieldName: "type",
- },
- }
- DNSRequestTypeHolderDoc.Fields = make([]encoder.Doc, 1)
- DNSRequestTypeHolderDoc.Fields[0].Name = ""
- DNSRequestTypeHolderDoc.Fields[0].Type = "DNSRequestType"
- DNSRequestTypeHolderDoc.Fields[0].Note = ""
- DNSRequestTypeHolderDoc.Fields[0].Description = ""
- DNSRequestTypeHolderDoc.Fields[0].Comments[encoder.LineComment] = ""
- DNSRequestTypeHolderDoc.Fields[0].EnumFields = []string{
- "A",
- "NS",
- "DS",
- "CNAME",
- "SOA",
- "PTR",
- "MX",
- "TXT",
- "AAAA",
- }
-
FILERequestDoc.Type = "file.Request"
FILERequestDoc.Comments[encoder.LineComment] = " Request contains a File matching mechanism for local disk operations."
FILERequestDoc.Description = "Request contains a File matching mechanism for local disk operations."
@@ -1069,36 +815,6 @@ func init() {
FieldName: "file",
},
}
- FILERequestDoc.PartDefinitions = []encoder.KeyValue{
- {
- Key: "template-id",
- Value: "ID of the template executed",
- },
- {
- Key: "template-info",
- Value: "Info Block of the template executed",
- },
- {
- Key: "template-path",
- Value: "Path of the template executed",
- },
- {
- Key: "matched",
- Value: "Matched is the input which was matched upon",
- },
- {
- Key: "path",
- Value: "Path is the path of file on local filesystem",
- },
- {
- Key: "type",
- Value: "Type is the type of request made",
- },
- {
- Key: "raw,body,all,data",
- Value: "Raw contains the raw file contents",
- },
- }
FILERequestDoc.Fields = make([]encoder.Doc, 8)
FILERequestDoc.Fields[0].Name = "matchers"
FILERequestDoc.Fields[0].Type = "[]matchers.Matcher"
@@ -1162,44 +878,6 @@ func init() {
FieldName: "network",
},
}
- NETWORKRequestDoc.PartDefinitions = []encoder.KeyValue{
- {
- Key: "template-id",
- Value: "ID of the template executed",
- },
- {
- Key: "template-info",
- Value: "Info Block of the template executed",
- },
- {
- Key: "template-path",
- Value: "Path of the template executed",
- },
- {
- Key: "host",
- Value: "Host is the input to the template",
- },
- {
- Key: "matched",
- Value: "Matched is the input which was matched upon",
- },
- {
- Key: "type",
- Value: "Type is the type of request made",
- },
- {
- Key: "request",
- Value: "Network request made from the client",
- },
- {
- Key: "body,all,data",
- Value: "Network response recieved from server (default)",
- },
- {
- Key: "raw",
- Value: "Full Network protocol data",
- },
- }
NETWORKRequestDoc.Fields = make([]encoder.Doc, 10)
NETWORKRequestDoc.Fields[0].Name = "id"
NETWORKRequestDoc.Fields[0].Type = "string"
@@ -1305,26 +983,6 @@ func init() {
NETWORKInputDoc.Fields[3].AddExample("", "prefix")
- NetworkInputTypeHolderDoc.Type = "NetworkInputTypeHolder"
- NetworkInputTypeHolderDoc.Comments[encoder.LineComment] = " NetworkInputTypeHolder is used to hold internal type of the Network type"
- NetworkInputTypeHolderDoc.Description = "NetworkInputTypeHolder is used to hold internal type of the Network type"
- NetworkInputTypeHolderDoc.AppearsIn = []encoder.Appearance{
- {
- TypeName: "network.Input",
- FieldName: "type",
- },
- }
- NetworkInputTypeHolderDoc.Fields = make([]encoder.Doc, 1)
- NetworkInputTypeHolderDoc.Fields[0].Name = ""
- NetworkInputTypeHolderDoc.Fields[0].Type = "NetworkInputType"
- NetworkInputTypeHolderDoc.Fields[0].Note = ""
- NetworkInputTypeHolderDoc.Fields[0].Description = ""
- NetworkInputTypeHolderDoc.Fields[0].Comments[encoder.LineComment] = ""
- NetworkInputTypeHolderDoc.Fields[0].EnumFields = []string{
- "hex",
- "text",
- }
-
HEADLESSRequestDoc.Type = "headless.Request"
HEADLESSRequestDoc.Comments[encoder.LineComment] = " Request contains a Headless protocol request to be made from a template"
HEADLESSRequestDoc.Description = "Request contains a Headless protocol request to be made from a template"
@@ -1334,40 +992,6 @@ func init() {
FieldName: "headless",
},
}
- HEADLESSRequestDoc.PartDefinitions = []encoder.KeyValue{
- {
- Key: "template-id",
- Value: "ID of the template executed",
- },
- {
- Key: "template-info",
- Value: "Info Block of the template executed",
- },
- {
- Key: "template-path",
- Value: "Path of the template executed",
- },
- {
- Key: "host",
- Value: "Host is the input to the template",
- },
- {
- Key: "matched",
- Value: "Matched is the input which was matched upon",
- },
- {
- Key: "type",
- Value: "Type is the type of request made",
- },
- {
- Key: "req",
- Value: "Headless request made from the client",
- },
- {
- Key: "resp,body,data",
- Value: "Headless response recieved from client (default)",
- },
- }
HEADLESSRequestDoc.Fields = make([]encoder.Doc, 5)
HEADLESSRequestDoc.Fields[0].Name = "id"
HEADLESSRequestDoc.Fields[0].Type = "string"
@@ -1430,46 +1054,6 @@ func init() {
ENGINEActionDoc.Fields[3].Description = "Action is the type of the action to perform."
ENGINEActionDoc.Fields[3].Comments[encoder.LineComment] = "Action is the type of the action to perform."
- ActionTypeHolderDoc.Type = "ActionTypeHolder"
- ActionTypeHolderDoc.Comments[encoder.LineComment] = " ActionTypeHolder is used to hold internal type of the action"
- ActionTypeHolderDoc.Description = "ActionTypeHolder is used to hold internal type of the action"
- ActionTypeHolderDoc.AppearsIn = []encoder.Appearance{
- {
- TypeName: "engine.Action",
- FieldName: "action",
- },
- }
- ActionTypeHolderDoc.Fields = make([]encoder.Doc, 1)
- ActionTypeHolderDoc.Fields[0].Name = ""
- ActionTypeHolderDoc.Fields[0].Type = "ActionType"
- ActionTypeHolderDoc.Fields[0].Note = ""
- ActionTypeHolderDoc.Fields[0].Description = ""
- ActionTypeHolderDoc.Fields[0].Comments[encoder.LineComment] = ""
- ActionTypeHolderDoc.Fields[0].EnumFields = []string{
- "navigate",
- "script",
- "click",
- "rightclick",
- "text",
- "screenshot",
- "time",
- "select",
- "files",
- "waitload",
- "getresource",
- "extract",
- "setmethod",
- "addheader",
- "setheader",
- "deleteheader",
- "setbody",
- "waitevent",
- "keyboard",
- "debug",
- "sleep",
- "waitvisible",
- }
-
SSLRequestDoc.Type = "ssl.Request"
SSLRequestDoc.Comments[encoder.LineComment] = " Request is a request for the SSL protocol"
SSLRequestDoc.Description = "Request is a request for the SSL protocol"
@@ -1479,28 +1063,6 @@ func init() {
FieldName: "ssl",
},
}
- SSLRequestDoc.PartDefinitions = []encoder.KeyValue{
- {
- Key: "type",
- Value: "Type is the type of request made",
- },
- {
- Key: "response",
- Value: "JSON SSL protocol handshake details",
- },
- {
- Key: "not_after",
- Value: "Timestamp after which the remote cert expires",
- },
- {
- Key: "host",
- Value: "Host is the input to the template",
- },
- {
- Key: "matched",
- Value: "Matched is the input which was matched upon",
- },
- }
SSLRequestDoc.Fields = make([]encoder.Doc, 4)
SSLRequestDoc.Fields[0].Name = "matchers"
SSLRequestDoc.Fields[0].Type = "[]matchers.Matcher"
@@ -1536,32 +1098,6 @@ func init() {
FieldName: "websocket",
},
}
- WEBSOCKETRequestDoc.PartDefinitions = []encoder.KeyValue{
- {
- Key: "type",
- Value: "Type is the type of request made",
- },
- {
- Key: "success",
- Value: "Success specifies whether websocket connection was successful",
- },
- {
- Key: "request",
- Value: "Websocket request made to the server",
- },
- {
- Key: "response",
- Value: "Websocket response recieved from the server",
- },
- {
- Key: "host",
- Value: "Host is the input to the template",
- },
- {
- Key: "matched",
- Value: "Matched is the input which was matched upon",
- },
- }
WEBSOCKETRequestDoc.Fields = make([]encoder.Doc, 8)
WEBSOCKETRequestDoc.Fields[0].Name = "matchers"
WEBSOCKETRequestDoc.Fields[0].Type = "[]matchers.Matcher"
@@ -1713,20 +1249,14 @@ func GetTemplateDoc() *encoder.FileDoc {
&MODELClassificationDoc,
&HTTPRequestDoc,
&MATCHERSMatcherDoc,
- &MatcherTypeHolderDoc,
&EXTRACTORSExtractorDoc,
- &ExtractorTypeHolderDoc,
&GENERATORSAttackTypeHolderDoc,
- &HTTPMethodTypeHolderDoc,
&DNSRequestDoc,
- &DNSRequestTypeHolderDoc,
&FILERequestDoc,
&NETWORKRequestDoc,
&NETWORKInputDoc,
- &NetworkInputTypeHolderDoc,
&HEADLESSRequestDoc,
&ENGINEActionDoc,
- &ActionTypeHolderDoc,
&SSLRequestDoc,
&WEBSOCKETRequestDoc,
&WEBSOCKETInputDoc,