Auto Generate Syntax Docs + JSONSchema [Thu Nov 11 23:16:47 UTC 2021] 🤖

dev
GitHub Action 2021-11-11 23:16:47 +00:00
parent 304b63907e
commit dc0c568cb8
3 changed files with 707 additions and 44 deletions

View File

@ -219,6 +219,32 @@ Headless contains the headless request to make in the template.
<div class="dd">
<code>ssl</code> <i>[]<a href="#sslrequest">ssl.Request</a></i>
</div>
<div class="dt">
SSL contains the SSL request to make in the template.
</div>
<hr />
<div class="dd">
<code>websocket</code> <i>[]<a href="#websocketrequest">websocket.Request</a></i>
</div>
<div class="dt">
Websocket contains the Websocket request to make in the template.
</div>
<hr />
<div class="dd">
<code>workflows</code> <i>[]<a href="#workflowsworkflowtemplate">workflows.WorkflowTemplate</a></i>
</div>
@ -829,7 +855,7 @@ in a combined manner allowing multirequest based matchers.
<div class="dd">
<code>attack</code> <i>string</i>
<code>attack</code> <i><a href="#generatorsattacktypeholder">generators.AttackTypeHolder</a></i>
</div>
<div class="dt">
@ -1238,6 +1264,10 @@ Appears in:
- <code><a href="#headlessrequest">headless.Request</a>.matchers</code>
- <code><a href="#sslrequest">ssl.Request</a>.matchers</code>
- <code><a href="#websocketrequest">websocket.Request</a>.matchers</code>
<hr />
@ -1594,6 +1624,10 @@ Appears in:
- <code><a href="#headlessrequest">headless.Request</a>.extractors</code>
- <code><a href="#sslrequest">ssl.Request</a>.extractors</code>
- <code><a href="#websocketrequest">websocket.Request</a>.extractors</code>
<hr />
@ -1877,6 +1911,22 @@ Valid values:
## generators.AttackTypeHolder
AttackTypeHolder is used to hold internal type of the protocol
Appears in:
- <code><a href="#httprequest">http.Request</a>.attack</code>
- <code><a href="#networkrequest">network.Request</a>.attack</code>
- <code><a href="#websocketrequest">websocket.Request</a>.attack</code>
## dns.Request
Request contains a DNS protocol request to be made from a template
@ -1998,7 +2048,7 @@ name: '{{FQDN}}'
</div>
<div class="dt">
Type is the type of DNS request to make.
RequestType is the type of DNS request to make.
Valid values:
@ -2358,7 +2408,7 @@ host:
<div class="dd">
<code>attack</code> <i>string</i>
<code>attack</code> <i><a href="#generatorsattacktypeholder">generators.AttackTypeHolder</a></i>
</div>
<div class="dt">
@ -2852,6 +2902,303 @@ Valid values:
## ssl.Request
Request is a request for the SSL protocol
Appears in:
- <code><a href="#template">Template</a>.ssl</code>
<hr />
<div class="dd">
<code>matchers</code> <i>[]<a href="#matchersmatcher">matchers.Matcher</a></i>
</div>
<div class="dt">
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.
</div>
<hr />
<div class="dd">
<code>extractors</code> <i>[]<a href="#extractorsextractor">extractors.Extractor</a></i>
</div>
<div class="dt">
Extractors contains the extraction mechanism for the request to identify
and extract parts of the response.
</div>
<hr />
<div class="dd">
<code>matchers-condition</code> <i>string</i>
</div>
<div class="dt">
MatchersCondition is the condition between the matchers. Default is OR.
Valid values:
- <code>and</code>
- <code>or</code>
</div>
<hr />
<div class="dd">
<code>address</code> <i>string</i>
</div>
<div class="dt">
Address contains address for the request
</div>
<hr />
## websocket.Request
Request is a request for the Websocket protocol
Appears in:
- <code><a href="#template">Template</a>.websocket</code>
<hr />
<div class="dd">
<code>matchers</code> <i>[]<a href="#matchersmatcher">matchers.Matcher</a></i>
</div>
<div class="dt">
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.
</div>
<hr />
<div class="dd">
<code>extractors</code> <i>[]<a href="#extractorsextractor">extractors.Extractor</a></i>
</div>
<div class="dt">
Extractors contains the extraction mechanism for the request to identify
and extract parts of the response.
</div>
<hr />
<div class="dd">
<code>matchers-condition</code> <i>string</i>
</div>
<div class="dt">
MatchersCondition is the condition between the matchers. Default is OR.
Valid values:
- <code>and</code>
- <code>or</code>
</div>
<hr />
<div class="dd">
<code>address</code> <i>string</i>
</div>
<div class="dt">
Address contains address for the request
</div>
<hr />
<div class="dd">
<code>inputs</code> <i>[]<a href="#websocketinput">websocket.Input</a></i>
</div>
<div class="dt">
Inputs contains inputs for the websocket protocol
</div>
<hr />
<div class="dd">
<code>headers</code> <i>map[string]string</i>
</div>
<div class="dt">
Headers contains headers for the request.
</div>
<hr />
<div class="dd">
<code>attack</code> <i><a href="#generatorsattacktypeholder">generators.AttackTypeHolder</a></i>
</div>
<div class="dt">
Attack is the type of payload combinations to perform.
Sniper is each payload once, pitchfork combines multiple payload sets and clusterbomb generates
permutations and combinations for all payloads.
Valid values:
- <code>sniper</code>
- <code>pitchfork</code>
- <code>clusterbomb</code>
</div>
<hr />
<div class="dd">
<code>payloads</code> <i>map[string]interface{}</i>
</div>
<div class="dt">
Payloads contains any payloads for the current request.
Payloads support both key-values combinations where a list
of payloads is provided, or optionally a single file can also
be provided as payload which will be read on run-time.
</div>
<hr />
## websocket.Input
Appears in:
- <code><a href="#websocketrequest">websocket.Request</a>.inputs</code>
<hr />
<div class="dd">
<code>data</code> <i>string</i>
</div>
<div class="dt">
Data is the data to send as the input.
It supports DSL Helper Functions as well as normal expressions.
Examples:
```yaml
data: TEST
```
```yaml
data: hex_decode('50494e47')
```
</div>
<hr />
<div class="dd">
<code>name</code> <i>string</i>
</div>
<div class="dt">
Name is the optional name of the data read to provide matching on.
Examples:
```yaml
name: prefix
```
</div>
<hr />
## workflows.WorkflowTemplate
Appears in:

View File

@ -308,6 +308,16 @@
"additionalProperties": false,
"type": "object"
},
"generators.AttackTypeHolder": {
"enum": [
"batteringram",
"pitchfork",
"clusterbomb"
],
"type": "string",
"title": "type of the attack",
"description": "Type of the attack"
},
"dns.Request": {
"properties": {
"matchers": {
@ -615,12 +625,8 @@
"description": "Optional name for the HTTP Request"
},
"attack": {
"enum": [
"batteringram",
"pitchfork",
"clusterbomb"
],
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/generators.AttackTypeHolder",
"title": "attack is the payload combination",
"description": "Attack is the type of payload combinations to perform"
},
@ -786,12 +792,7 @@
"description": "Host to send network requests to"
},
"attack": {
"enum": [
"batteringram",
"pitchfork",
"clusterbomb"
],
"type": "string",
"$ref": "#/definitions/generators.AttackTypeHolder",
"title": "attack is the payload combination",
"description": "Attack is the type of payload combinations to perform"
},
@ -853,6 +854,128 @@
"additionalProperties": false,
"type": "object"
},
"ssl.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"
},
"address": {
"type": "string",
"title": "address for the ssl request",
"description": "Address contains address for the request"
}
},
"additionalProperties": false,
"type": "object"
},
"websocket.Input": {
"properties": {
"data": {
"type": "string",
"title": "data to send as input",
"description": "Data is the data to send as the input"
},
"name": {
"type": "string",
"title": "optional name for data read",
"description": "Optional name of the data read to provide matching on"
}
},
"additionalProperties": false,
"type": "object"
},
"websocket.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"
},
"address": {
"type": "string",
"title": "address for the websocket request",
"description": "Address contains address for the request"
},
"inputs": {
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/websocket.Input"
},
"type": "array",
"title": "inputs for the websocket request",
"description": "Inputs contains any input/output for the current request"
},
"headers": {
"patternProperties": {
".*": {
"type": "string"
}
},
"type": "object",
"title": "headers contains the request headers",
"description": "Headers contains headers for the request"
},
"attack": {
"$ref": "#/definitions/generators.AttackTypeHolder",
"title": "attack is the payload combination",
"description": "Attack is the type of payload combinations to perform"
},
"payloads": {
"patternProperties": {
".*": {
"additionalProperties": true
}
},
"type": "object",
"title": "payloads for the webosocket request",
"description": "Payloads contains any payloads for the current request"
}
},
"additionalProperties": false,
"type": "object"
},
"templates.Template": {
"required": [
"id",
@ -919,6 +1042,24 @@
"title": "headless requests to make",
"description": "Headless requests to make for the template"
},
"ssl": {
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/ssl.Request"
},
"type": "array",
"title": "ssl requests to make",
"description": "SSL requests to make for the template"
},
"websocket": {
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/websocket.Request"
},
"type": "array",
"title": "websocket requests to make",
"description": "Websocket requests to make for the template"
},
"workflows": {
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",

View File

@ -9,29 +9,33 @@ import (
)
var (
TemplateDoc encoder.Doc
MODELInfoDoc encoder.Doc
STRINGSLICEStringSliceDoc encoder.Doc
SEVERITYHolderDoc encoder.Doc
MODELClassificationDoc encoder.Doc
HTTPRequestDoc encoder.Doc
MATCHERSMatcherDoc encoder.Doc
EXTRACTORSExtractorDoc encoder.Doc
DNSRequestDoc encoder.Doc
FILERequestDoc encoder.Doc
NETWORKRequestDoc encoder.Doc
NETWORKInputDoc encoder.Doc
HEADLESSRequestDoc encoder.Doc
ENGINEActionDoc encoder.Doc
WORKFLOWSWorkflowTemplateDoc encoder.Doc
WORKFLOWSMatcherDoc encoder.Doc
TemplateDoc encoder.Doc
MODELInfoDoc encoder.Doc
STRINGSLICEStringSliceDoc encoder.Doc
SEVERITYHolderDoc encoder.Doc
MODELClassificationDoc encoder.Doc
HTTPRequestDoc encoder.Doc
MATCHERSMatcherDoc encoder.Doc
EXTRACTORSExtractorDoc encoder.Doc
GENERATORSAttackTypeHolderDoc encoder.Doc
DNSRequestDoc encoder.Doc
FILERequestDoc encoder.Doc
NETWORKRequestDoc encoder.Doc
NETWORKInputDoc encoder.Doc
HEADLESSRequestDoc encoder.Doc
ENGINEActionDoc encoder.Doc
SSLRequestDoc encoder.Doc
WEBSOCKETRequestDoc encoder.Doc
WEBSOCKETInputDoc encoder.Doc
WORKFLOWSWorkflowTemplateDoc encoder.Doc
WORKFLOWSMatcherDoc encoder.Doc
)
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, 9)
TemplateDoc.Fields = make([]encoder.Doc, 11)
TemplateDoc.Fields[0].Name = "id"
TemplateDoc.Fields[0].Type = "string"
TemplateDoc.Fields[0].Note = ""
@ -79,16 +83,26 @@ func init() {
TemplateDoc.Fields[6].Note = ""
TemplateDoc.Fields[6].Description = "Headless contains the headless request to make in the template."
TemplateDoc.Fields[6].Comments[encoder.LineComment] = "Headless contains the headless request to make in the template."
TemplateDoc.Fields[7].Name = "workflows"
TemplateDoc.Fields[7].Type = "[]workflows.WorkflowTemplate"
TemplateDoc.Fields[7].Name = "ssl"
TemplateDoc.Fields[7].Type = "[]ssl.Request"
TemplateDoc.Fields[7].Note = ""
TemplateDoc.Fields[7].Description = "Workflows is a list of workflows to execute for a template."
TemplateDoc.Fields[7].Comments[encoder.LineComment] = "Workflows is a list of workflows to execute for a template."
TemplateDoc.Fields[8].Name = "self-contained"
TemplateDoc.Fields[8].Type = "bool"
TemplateDoc.Fields[7].Description = "SSL contains the SSL request to make in the template."
TemplateDoc.Fields[7].Comments[encoder.LineComment] = "SSL contains the SSL request to make in the template."
TemplateDoc.Fields[8].Name = "websocket"
TemplateDoc.Fields[8].Type = "[]websocket.Request"
TemplateDoc.Fields[8].Note = ""
TemplateDoc.Fields[8].Description = "Self Contained marks Requests for the template as self-contained"
TemplateDoc.Fields[8].Comments[encoder.LineComment] = "Self Contained marks Requests for the template as self-contained"
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].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[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"
MODELInfoDoc.Type = "model.Info"
MODELInfoDoc.Comments[encoder.LineComment] = " Info contains metadata information about a template"
@ -320,7 +334,7 @@ func init() {
HTTPRequestDoc.Fields[6].Description = "Name is the optional name of the request.\n\nIf a name is specified, all the named request in a template can be matched upon\nin a combined manner allowing multirequest based matchers."
HTTPRequestDoc.Fields[6].Comments[encoder.LineComment] = "Name is the optional name of the request."
HTTPRequestDoc.Fields[7].Name = "attack"
HTTPRequestDoc.Fields[7].Type = "string"
HTTPRequestDoc.Fields[7].Type = "generators.AttackTypeHolder"
HTTPRequestDoc.Fields[7].Note = ""
HTTPRequestDoc.Fields[7].Description = "Attack is the type of payload combinations to perform.\n\nbatteringram is same payload into all of the defined payload positions at once, pitchfork combines multiple payload sets and clusterbomb generates\npermutations and combinations for all payloads."
HTTPRequestDoc.Fields[7].Comments[encoder.LineComment] = "Attack is the type of payload combinations to perform."
@ -472,6 +486,14 @@ func init() {
TypeName: "headless.Request",
FieldName: "matchers",
},
{
TypeName: "ssl.Request",
FieldName: "matchers",
},
{
TypeName: "websocket.Request",
FieldName: "matchers",
},
}
MATCHERSMatcherDoc.Fields = make([]encoder.Doc, 13)
MATCHERSMatcherDoc.Fields[0].Name = "type"
@ -609,6 +631,14 @@ func init() {
TypeName: "headless.Request",
FieldName: "extractors",
},
{
TypeName: "ssl.Request",
FieldName: "extractors",
},
{
TypeName: "websocket.Request",
FieldName: "extractors",
},
}
EXTRACTORSExtractorDoc.Fields = make([]encoder.Doc, 11)
EXTRACTORSExtractorDoc.Fields[0].Name = "name"
@ -697,6 +727,25 @@ func init() {
"true",
}
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"
GENERATORSAttackTypeHolderDoc.AppearsIn = []encoder.Appearance{
{
TypeName: "http.Request",
FieldName: "attack",
},
{
TypeName: "network.Request",
FieldName: "attack",
},
{
TypeName: "websocket.Request",
FieldName: "attack",
},
}
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"
DNSRequestDoc.Description = "Request contains a DNS protocol request to be made from a template"
@ -743,8 +792,8 @@ func init() {
DNSRequestDoc.Fields[5].Name = "type"
DNSRequestDoc.Fields[5].Type = "string"
DNSRequestDoc.Fields[5].Note = ""
DNSRequestDoc.Fields[5].Description = "Type is the type of DNS request to make."
DNSRequestDoc.Fields[5].Comments[encoder.LineComment] = "Type is the type of DNS request to make."
DNSRequestDoc.Fields[5].Description = "RequestType is the type of DNS request to make."
DNSRequestDoc.Fields[5].Comments[encoder.LineComment] = "RequestType is the type of DNS request to make."
DNSRequestDoc.Fields[5].Values = []string{
"A",
"NS",
@ -875,7 +924,7 @@ func init() {
NETWORKRequestDoc.Fields[1].AddExample("", []string{"{{Hostname}}"})
NETWORKRequestDoc.Fields[2].Name = "attack"
NETWORKRequestDoc.Fields[2].Type = "string"
NETWORKRequestDoc.Fields[2].Type = "generators.AttackTypeHolder"
NETWORKRequestDoc.Fields[2].Note = ""
NETWORKRequestDoc.Fields[2].Description = "Attack is the type of payload combinations to perform.\n\nBatteringram is same payload into all of the defined payload positions at once, pitchfork combines multiple payload sets and clusterbomb generates\npermutations and combinations for all payloads."
NETWORKRequestDoc.Fields[2].Comments[encoder.LineComment] = "Attack is the type of payload combinations to perform."
@ -1065,6 +1114,128 @@ func init() {
"sleep",
}
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"
SSLRequestDoc.AppearsIn = []encoder.Appearance{
{
TypeName: "Template",
FieldName: "ssl",
},
}
SSLRequestDoc.Fields = make([]encoder.Doc, 4)
SSLRequestDoc.Fields[0].Name = "matchers"
SSLRequestDoc.Fields[0].Type = "[]matchers.Matcher"
SSLRequestDoc.Fields[0].Note = ""
SSLRequestDoc.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."
SSLRequestDoc.Fields[0].Comments[encoder.LineComment] = "Matchers contains the detection mechanism for the request to identify"
SSLRequestDoc.Fields[1].Name = "extractors"
SSLRequestDoc.Fields[1].Type = "[]extractors.Extractor"
SSLRequestDoc.Fields[1].Note = ""
SSLRequestDoc.Fields[1].Description = "Extractors contains the extraction mechanism for the request to identify\nand extract parts of the response."
SSLRequestDoc.Fields[1].Comments[encoder.LineComment] = "Extractors contains the extraction mechanism for the request to identify"
SSLRequestDoc.Fields[2].Name = "matchers-condition"
SSLRequestDoc.Fields[2].Type = "string"
SSLRequestDoc.Fields[2].Note = ""
SSLRequestDoc.Fields[2].Description = "MatchersCondition is the condition between the matchers. Default is OR."
SSLRequestDoc.Fields[2].Comments[encoder.LineComment] = "MatchersCondition is the condition between the matchers. Default is OR."
SSLRequestDoc.Fields[2].Values = []string{
"and",
"or",
}
SSLRequestDoc.Fields[3].Name = "address"
SSLRequestDoc.Fields[3].Type = "string"
SSLRequestDoc.Fields[3].Note = ""
SSLRequestDoc.Fields[3].Description = "Address contains address for the request"
SSLRequestDoc.Fields[3].Comments[encoder.LineComment] = "Address contains address for the request"
WEBSOCKETRequestDoc.Type = "websocket.Request"
WEBSOCKETRequestDoc.Comments[encoder.LineComment] = " Request is a request for the Websocket protocol"
WEBSOCKETRequestDoc.Description = "Request is a request for the Websocket protocol"
WEBSOCKETRequestDoc.AppearsIn = []encoder.Appearance{
{
TypeName: "Template",
FieldName: "websocket",
},
}
WEBSOCKETRequestDoc.Fields = make([]encoder.Doc, 8)
WEBSOCKETRequestDoc.Fields[0].Name = "matchers"
WEBSOCKETRequestDoc.Fields[0].Type = "[]matchers.Matcher"
WEBSOCKETRequestDoc.Fields[0].Note = ""
WEBSOCKETRequestDoc.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."
WEBSOCKETRequestDoc.Fields[0].Comments[encoder.LineComment] = "Matchers contains the detection mechanism for the request to identify"
WEBSOCKETRequestDoc.Fields[1].Name = "extractors"
WEBSOCKETRequestDoc.Fields[1].Type = "[]extractors.Extractor"
WEBSOCKETRequestDoc.Fields[1].Note = ""
WEBSOCKETRequestDoc.Fields[1].Description = "Extractors contains the extraction mechanism for the request to identify\nand extract parts of the response."
WEBSOCKETRequestDoc.Fields[1].Comments[encoder.LineComment] = "Extractors contains the extraction mechanism for the request to identify"
WEBSOCKETRequestDoc.Fields[2].Name = "matchers-condition"
WEBSOCKETRequestDoc.Fields[2].Type = "string"
WEBSOCKETRequestDoc.Fields[2].Note = ""
WEBSOCKETRequestDoc.Fields[2].Description = "MatchersCondition is the condition between the matchers. Default is OR."
WEBSOCKETRequestDoc.Fields[2].Comments[encoder.LineComment] = "MatchersCondition is the condition between the matchers. Default is OR."
WEBSOCKETRequestDoc.Fields[2].Values = []string{
"and",
"or",
}
WEBSOCKETRequestDoc.Fields[3].Name = "address"
WEBSOCKETRequestDoc.Fields[3].Type = "string"
WEBSOCKETRequestDoc.Fields[3].Note = ""
WEBSOCKETRequestDoc.Fields[3].Description = "Address contains address for the request"
WEBSOCKETRequestDoc.Fields[3].Comments[encoder.LineComment] = "Address contains address for the request"
WEBSOCKETRequestDoc.Fields[4].Name = "inputs"
WEBSOCKETRequestDoc.Fields[4].Type = "[]websocket.Input"
WEBSOCKETRequestDoc.Fields[4].Note = ""
WEBSOCKETRequestDoc.Fields[4].Description = "Inputs contains inputs for the websocket protocol"
WEBSOCKETRequestDoc.Fields[4].Comments[encoder.LineComment] = "Inputs contains inputs for the websocket protocol"
WEBSOCKETRequestDoc.Fields[5].Name = "headers"
WEBSOCKETRequestDoc.Fields[5].Type = "map[string]string"
WEBSOCKETRequestDoc.Fields[5].Note = ""
WEBSOCKETRequestDoc.Fields[5].Description = "Headers contains headers for the request."
WEBSOCKETRequestDoc.Fields[5].Comments[encoder.LineComment] = "Headers contains headers for the request."
WEBSOCKETRequestDoc.Fields[6].Name = "attack"
WEBSOCKETRequestDoc.Fields[6].Type = "generators.AttackTypeHolder"
WEBSOCKETRequestDoc.Fields[6].Note = ""
WEBSOCKETRequestDoc.Fields[6].Description = "Attack is the type of payload combinations to perform.\n\nSniper is each payload once, pitchfork combines multiple payload sets and clusterbomb generates\npermutations and combinations for all payloads."
WEBSOCKETRequestDoc.Fields[6].Comments[encoder.LineComment] = "Attack is the type of payload combinations to perform."
WEBSOCKETRequestDoc.Fields[6].Values = []string{
"sniper",
"pitchfork",
"clusterbomb",
}
WEBSOCKETRequestDoc.Fields[7].Name = "payloads"
WEBSOCKETRequestDoc.Fields[7].Type = "map[string]interface{}"
WEBSOCKETRequestDoc.Fields[7].Note = ""
WEBSOCKETRequestDoc.Fields[7].Description = "Payloads contains any payloads for the current request.\n\nPayloads support both key-values combinations where a list\nof payloads is provided, or optionally a single file can also\nbe provided as payload which will be read on run-time."
WEBSOCKETRequestDoc.Fields[7].Comments[encoder.LineComment] = "Payloads contains any payloads for the current request."
WEBSOCKETInputDoc.Type = "websocket.Input"
WEBSOCKETInputDoc.Comments[encoder.LineComment] = ""
WEBSOCKETInputDoc.Description = ""
WEBSOCKETInputDoc.AppearsIn = []encoder.Appearance{
{
TypeName: "websocket.Request",
FieldName: "inputs",
},
}
WEBSOCKETInputDoc.Fields = make([]encoder.Doc, 2)
WEBSOCKETInputDoc.Fields[0].Name = "data"
WEBSOCKETInputDoc.Fields[0].Type = "string"
WEBSOCKETInputDoc.Fields[0].Note = ""
WEBSOCKETInputDoc.Fields[0].Description = "Data is the data to send as the input.\n\nIt supports DSL Helper Functions as well as normal expressions."
WEBSOCKETInputDoc.Fields[0].Comments[encoder.LineComment] = "Data is the data to send as the input."
WEBSOCKETInputDoc.Fields[0].AddExample("", "TEST")
WEBSOCKETInputDoc.Fields[0].AddExample("", "hex_decode('50494e47')")
WEBSOCKETInputDoc.Fields[1].Name = "name"
WEBSOCKETInputDoc.Fields[1].Type = "string"
WEBSOCKETInputDoc.Fields[1].Note = ""
WEBSOCKETInputDoc.Fields[1].Description = "Name is the optional name of the data read to provide matching on."
WEBSOCKETInputDoc.Fields[1].Comments[encoder.LineComment] = "Name is the optional name of the data read to provide matching on."
WEBSOCKETInputDoc.Fields[1].AddExample("", "prefix")
WORKFLOWSWorkflowTemplateDoc.Type = "workflows.WorkflowTemplate"
WORKFLOWSWorkflowTemplateDoc.Comments[encoder.LineComment] = ""
WORKFLOWSWorkflowTemplateDoc.Description = ""
@ -1144,12 +1315,16 @@ func GetTemplateDoc() *encoder.FileDoc {
&HTTPRequestDoc,
&MATCHERSMatcherDoc,
&EXTRACTORSExtractorDoc,
&GENERATORSAttackTypeHolderDoc,
&DNSRequestDoc,
&FILERequestDoc,
&NETWORKRequestDoc,
&NETWORKInputDoc,
&HEADLESSRequestDoc,
&ENGINEActionDoc,
&SSLRequestDoc,
&WEBSOCKETRequestDoc,
&WEBSOCKETInputDoc,
&WORKFLOWSWorkflowTemplateDoc,
&WORKFLOWSMatcherDoc,
},