Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
projectdiscovery
GitHub Repository: projectdiscovery/nuclei
Path: blob/dev/pkg/templates/templates_doc.go
2070 views
1
// This Source Code Form is subject to the terms of the Mozilla Public
2
// License, v. 2.0. If a copy of the MPL was not distributed with this
3
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
// DO NOT EDIT: this file is automatically generated by docgen
5
package templates
6
7
import (
8
"github.com/projectdiscovery/yamldoc-go/encoder"
9
)
10
11
var (
12
TemplateDoc encoder.Doc
13
MODELInfoDoc encoder.Doc
14
STRINGSLICEStringSliceDoc encoder.Doc
15
STRINGSLICERawStringSliceDoc encoder.Doc
16
SEVERITYHolderDoc encoder.Doc
17
MODELClassificationDoc encoder.Doc
18
HTTPRequestDoc encoder.Doc
19
GENERATORSAttackTypeHolderDoc encoder.Doc
20
HTTPMethodTypeHolderDoc encoder.Doc
21
FUZZRuleDoc encoder.Doc
22
SliceOrMapSliceDoc encoder.Doc
23
ANALYZERSAnalyzerTemplateDoc encoder.Doc
24
SignatureTypeHolderDoc encoder.Doc
25
MATCHERSMatcherDoc encoder.Doc
26
MatcherTypeHolderDoc encoder.Doc
27
DNSRequestDoc encoder.Doc
28
DNSRequestTypeHolderDoc encoder.Doc
29
FILERequestDoc encoder.Doc
30
NETWORKRequestDoc encoder.Doc
31
NETWORKInputDoc encoder.Doc
32
NetworkInputTypeHolderDoc encoder.Doc
33
HEADLESSRequestDoc encoder.Doc
34
ENGINEActionDoc encoder.Doc
35
ActionTypeHolderDoc encoder.Doc
36
USERAGENTUserAgentHolderDoc encoder.Doc
37
SSLRequestDoc encoder.Doc
38
WEBSOCKETRequestDoc encoder.Doc
39
WEBSOCKETInputDoc encoder.Doc
40
WHOISRequestDoc encoder.Doc
41
CODERequestDoc encoder.Doc
42
JAVASCRIPTRequestDoc encoder.Doc
43
HTTPSignatureTypeHolderDoc encoder.Doc
44
VARIABLESVariableDoc encoder.Doc
45
)
46
47
func init() {
48
TemplateDoc.Type = "Template"
49
TemplateDoc.Comments[encoder.LineComment] = " Template is a YAML input file which defines all the requests and"
50
TemplateDoc.Description = "Template is a YAML input file which defines all the requests and\n other metadata for a template."
51
TemplateDoc.Fields = make([]encoder.Doc, 20)
52
TemplateDoc.Fields[0].Name = "id"
53
TemplateDoc.Fields[0].Type = "string"
54
TemplateDoc.Fields[0].Note = ""
55
TemplateDoc.Fields[0].Description = "ID is the unique id for the template.\n\n#### Good IDs\n\nA good ID uniquely identifies what the requests in the template\nare doing. Let's say you have a template that identifies a git-config\nfile on the webservers, a good name would be `git-config-exposure`. Another\nexample name is `azure-apps-nxdomain-takeover`."
56
TemplateDoc.Fields[0].Comments[encoder.LineComment] = "ID is the unique id for the template."
57
58
TemplateDoc.Fields[0].AddExample("ID Example", "CVE-2021-19520")
59
TemplateDoc.Fields[1].Name = "info"
60
TemplateDoc.Fields[1].Type = "model.Info"
61
TemplateDoc.Fields[1].Note = ""
62
TemplateDoc.Fields[1].Description = "Info contains metadata information about the template."
63
TemplateDoc.Fields[1].Comments[encoder.LineComment] = "Info contains metadata information about the template."
64
65
TemplateDoc.Fields[1].AddExample("", exampleInfoStructure)
66
TemplateDoc.Fields[2].Name = "flow"
67
TemplateDoc.Fields[2].Type = "string"
68
TemplateDoc.Fields[2].Note = ""
69
TemplateDoc.Fields[2].Description = "description: |\n Flow contains the execution flow for the template.\n examples:\n - flow: |\n for region in regions {\n http(0)\n }\n for vpc in vpcs {\n http(1)\n }\n"
70
TemplateDoc.Fields[2].Comments[encoder.LineComment] = " description: |"
71
TemplateDoc.Fields[3].Name = "requests"
72
TemplateDoc.Fields[3].Type = "[]http.Request"
73
TemplateDoc.Fields[3].Note = ""
74
TemplateDoc.Fields[3].Description = "Requests contains the http request to make in the template.\nWARNING: 'requests' will be deprecated and will be removed in a future release. Please use 'http' instead."
75
TemplateDoc.Fields[3].Comments[encoder.LineComment] = "Requests contains the http request to make in the template."
76
77
TemplateDoc.Fields[3].AddExample("", exampleNormalHTTPRequest)
78
TemplateDoc.Fields[4].Name = "http"
79
TemplateDoc.Fields[4].Type = "[]http.Request"
80
TemplateDoc.Fields[4].Note = ""
81
TemplateDoc.Fields[4].Description = "description: |\n HTTP contains the http request to make in the template.\n examples:\n - value: exampleNormalHTTPRequest\n RequestsWithHTTP is placeholder(internal) only, and should not be used instead use RequestsHTTP\n Deprecated: Use RequestsHTTP instead."
82
TemplateDoc.Fields[4].Comments[encoder.LineComment] = " description: |"
83
TemplateDoc.Fields[5].Name = "dns"
84
TemplateDoc.Fields[5].Type = "[]dns.Request"
85
TemplateDoc.Fields[5].Note = ""
86
TemplateDoc.Fields[5].Description = "DNS contains the dns request to make in the template"
87
TemplateDoc.Fields[5].Comments[encoder.LineComment] = "DNS contains the dns request to make in the template"
88
89
TemplateDoc.Fields[5].AddExample("", exampleNormalDNSRequest)
90
TemplateDoc.Fields[6].Name = "file"
91
TemplateDoc.Fields[6].Type = "[]file.Request"
92
TemplateDoc.Fields[6].Note = ""
93
TemplateDoc.Fields[6].Description = "File contains the file request to make in the template"
94
TemplateDoc.Fields[6].Comments[encoder.LineComment] = "File contains the file request to make in the template"
95
96
TemplateDoc.Fields[6].AddExample("", exampleNormalFileRequest)
97
TemplateDoc.Fields[7].Name = "network"
98
TemplateDoc.Fields[7].Type = "[]network.Request"
99
TemplateDoc.Fields[7].Note = ""
100
TemplateDoc.Fields[7].Description = "Network contains the network request to make in the template\nWARNING: 'network' will be deprecated and will be removed in a future release. Please use 'tcp' instead."
101
TemplateDoc.Fields[7].Comments[encoder.LineComment] = "Network contains the network request to make in the template"
102
103
TemplateDoc.Fields[7].AddExample("", exampleNormalNetworkRequest)
104
TemplateDoc.Fields[8].Name = "tcp"
105
TemplateDoc.Fields[8].Type = "[]network.Request"
106
TemplateDoc.Fields[8].Note = ""
107
TemplateDoc.Fields[8].Description = "description: |\n TCP contains the network request to make in the template\n examples:\n - value: exampleNormalNetworkRequest\n RequestsWithTCP is placeholder(internal) only, and should not be used instead use RequestsNetwork\n Deprecated: Use RequestsNetwork instead."
108
TemplateDoc.Fields[8].Comments[encoder.LineComment] = " description: |"
109
TemplateDoc.Fields[9].Name = "headless"
110
TemplateDoc.Fields[9].Type = "[]headless.Request"
111
TemplateDoc.Fields[9].Note = ""
112
TemplateDoc.Fields[9].Description = "Headless contains the headless request to make in the template."
113
TemplateDoc.Fields[9].Comments[encoder.LineComment] = "Headless contains the headless request to make in the template."
114
TemplateDoc.Fields[10].Name = "ssl"
115
TemplateDoc.Fields[10].Type = "[]ssl.Request"
116
TemplateDoc.Fields[10].Note = ""
117
TemplateDoc.Fields[10].Description = "SSL contains the SSL request to make in the template."
118
TemplateDoc.Fields[10].Comments[encoder.LineComment] = "SSL contains the SSL request to make in the template."
119
TemplateDoc.Fields[11].Name = "websocket"
120
TemplateDoc.Fields[11].Type = "[]websocket.Request"
121
TemplateDoc.Fields[11].Note = ""
122
TemplateDoc.Fields[11].Description = "Websocket contains the Websocket request to make in the template."
123
TemplateDoc.Fields[11].Comments[encoder.LineComment] = "Websocket contains the Websocket request to make in the template."
124
TemplateDoc.Fields[12].Name = "whois"
125
TemplateDoc.Fields[12].Type = "[]whois.Request"
126
TemplateDoc.Fields[12].Note = ""
127
TemplateDoc.Fields[12].Description = "WHOIS contains the WHOIS request to make in the template."
128
TemplateDoc.Fields[12].Comments[encoder.LineComment] = "WHOIS contains the WHOIS request to make in the template."
129
TemplateDoc.Fields[13].Name = "code"
130
TemplateDoc.Fields[13].Type = "[]code.Request"
131
TemplateDoc.Fields[13].Note = ""
132
TemplateDoc.Fields[13].Description = "Code contains code snippets."
133
TemplateDoc.Fields[13].Comments[encoder.LineComment] = "Code contains code snippets."
134
TemplateDoc.Fields[14].Name = "javascript"
135
TemplateDoc.Fields[14].Type = "[]javascript.Request"
136
TemplateDoc.Fields[14].Note = ""
137
TemplateDoc.Fields[14].Description = "Javascript contains the javascript request to make in the template."
138
TemplateDoc.Fields[14].Comments[encoder.LineComment] = "Javascript contains the javascript request to make in the template."
139
TemplateDoc.Fields[15].Name = "self-contained"
140
TemplateDoc.Fields[15].Type = "bool"
141
TemplateDoc.Fields[15].Note = ""
142
TemplateDoc.Fields[15].Description = "Self Contained marks Requests for the template as self-contained"
143
TemplateDoc.Fields[15].Comments[encoder.LineComment] = "Self Contained marks Requests for the template as self-contained"
144
TemplateDoc.Fields[16].Name = "stop-at-first-match"
145
TemplateDoc.Fields[16].Type = "bool"
146
TemplateDoc.Fields[16].Note = ""
147
TemplateDoc.Fields[16].Description = "Stop execution once first match is found"
148
TemplateDoc.Fields[16].Comments[encoder.LineComment] = "Stop execution once first match is found"
149
TemplateDoc.Fields[17].Name = "signature"
150
TemplateDoc.Fields[17].Type = "http.SignatureTypeHolder"
151
TemplateDoc.Fields[17].Note = ""
152
TemplateDoc.Fields[17].Description = "Signature is the request signature method\nWARNING: 'signature' will be deprecated and will be removed in a future release. Prefer using 'code' protocol for writing cloud checks"
153
TemplateDoc.Fields[17].Comments[encoder.LineComment] = "Signature is the request signature method"
154
TemplateDoc.Fields[17].Values = []string{
155
"AWS",
156
}
157
TemplateDoc.Fields[18].Name = "variables"
158
TemplateDoc.Fields[18].Type = "variables.Variable"
159
TemplateDoc.Fields[18].Note = ""
160
TemplateDoc.Fields[18].Description = "Variables contains any variables for the current request."
161
TemplateDoc.Fields[18].Comments[encoder.LineComment] = "Variables contains any variables for the current request."
162
TemplateDoc.Fields[19].Name = "constants"
163
TemplateDoc.Fields[19].Type = "map[string]interface{}"
164
TemplateDoc.Fields[19].Note = ""
165
TemplateDoc.Fields[19].Description = "Constants contains any scalar constant for the current template"
166
TemplateDoc.Fields[19].Comments[encoder.LineComment] = "Constants contains any scalar constant for the current template"
167
168
MODELInfoDoc.Type = "model.Info"
169
MODELInfoDoc.Comments[encoder.LineComment] = " Info contains metadata information about a template"
170
MODELInfoDoc.Description = "Info contains metadata information about a template"
171
172
MODELInfoDoc.AddExample("", exampleInfoStructure)
173
MODELInfoDoc.AppearsIn = []encoder.Appearance{
174
{
175
TypeName: "Template",
176
FieldName: "info",
177
},
178
}
179
MODELInfoDoc.Fields = make([]encoder.Doc, 10)
180
MODELInfoDoc.Fields[0].Name = "name"
181
MODELInfoDoc.Fields[0].Type = "string"
182
MODELInfoDoc.Fields[0].Note = ""
183
MODELInfoDoc.Fields[0].Description = "Name should be good short summary that identifies what the template does."
184
MODELInfoDoc.Fields[0].Comments[encoder.LineComment] = "Name should be good short summary that identifies what the template does."
185
186
MODELInfoDoc.Fields[0].AddExample("", "bower.json file disclosure")
187
188
MODELInfoDoc.Fields[0].AddExample("", "Nagios Default Credentials Check")
189
MODELInfoDoc.Fields[1].Name = "author"
190
MODELInfoDoc.Fields[1].Type = "stringslice.StringSlice"
191
MODELInfoDoc.Fields[1].Note = ""
192
MODELInfoDoc.Fields[1].Description = "Author of the template.\n\nMultiple values can also be specified separated by commas."
193
MODELInfoDoc.Fields[1].Comments[encoder.LineComment] = "Author of the template."
194
195
MODELInfoDoc.Fields[1].AddExample("", "<username>")
196
MODELInfoDoc.Fields[2].Name = "tags"
197
MODELInfoDoc.Fields[2].Type = "stringslice.StringSlice"
198
MODELInfoDoc.Fields[2].Note = ""
199
MODELInfoDoc.Fields[2].Description = "Any tags for the template.\n\nMultiple values can also be specified separated by commas."
200
MODELInfoDoc.Fields[2].Comments[encoder.LineComment] = "Any tags for the template."
201
202
MODELInfoDoc.Fields[2].AddExample("Example tags", "cve,cve2019,grafana,auth-bypass,dos")
203
MODELInfoDoc.Fields[3].Name = "description"
204
MODELInfoDoc.Fields[3].Type = "string"
205
MODELInfoDoc.Fields[3].Note = ""
206
MODELInfoDoc.Fields[3].Description = "Description of the template.\n\nYou can go in-depth here on what the template actually does."
207
MODELInfoDoc.Fields[3].Comments[encoder.LineComment] = "Description of the template."
208
209
MODELInfoDoc.Fields[3].AddExample("", "Bower is a package manager which stores package information in the bower.json file")
210
211
MODELInfoDoc.Fields[3].AddExample("", "Subversion ALM for the enterprise before 8.8.2 allows reflected XSS at multiple locations")
212
MODELInfoDoc.Fields[4].Name = "impact"
213
MODELInfoDoc.Fields[4].Type = "string"
214
MODELInfoDoc.Fields[4].Note = ""
215
MODELInfoDoc.Fields[4].Description = "Impact of the template.\n\nYou can go in-depth here on impact of the template."
216
MODELInfoDoc.Fields[4].Comments[encoder.LineComment] = "Impact of the template."
217
218
MODELInfoDoc.Fields[4].AddExample("", "Successful exploitation of this vulnerability could allow an attacker to execute arbitrary SQL queries, potentially leading to unauthorized access, data leakage, or data manipulation.")
219
220
MODELInfoDoc.Fields[4].AddExample("", "Successful exploitation of this vulnerability could allow an attacker to execute arbitrary script code in the context of the victim's browser, potentially leading to session hijacking, defacement, or theft of sensitive information.")
221
MODELInfoDoc.Fields[5].Name = "reference"
222
MODELInfoDoc.Fields[5].Type = "stringslice.RawStringSlice"
223
MODELInfoDoc.Fields[5].Note = ""
224
MODELInfoDoc.Fields[5].Description = "References for the template.\n\nThis should contain links relevant to the template."
225
MODELInfoDoc.Fields[5].Comments[encoder.LineComment] = "References for the template."
226
227
MODELInfoDoc.Fields[5].AddExample("", []string{"https://github.com/strapi/strapi", "https://github.com/getgrav/grav"})
228
MODELInfoDoc.Fields[6].Name = "severity"
229
MODELInfoDoc.Fields[6].Type = "severity.Holder"
230
MODELInfoDoc.Fields[6].Note = ""
231
MODELInfoDoc.Fields[6].Description = "Severity of the template."
232
MODELInfoDoc.Fields[6].Comments[encoder.LineComment] = "Severity of the template."
233
MODELInfoDoc.Fields[7].Name = "metadata"
234
MODELInfoDoc.Fields[7].Type = "map[string]interface{}"
235
MODELInfoDoc.Fields[7].Note = ""
236
MODELInfoDoc.Fields[7].Description = "Metadata of the template."
237
MODELInfoDoc.Fields[7].Comments[encoder.LineComment] = "Metadata of the template."
238
239
MODELInfoDoc.Fields[7].AddExample("", map[string]string{"customField1": "customValue1"})
240
MODELInfoDoc.Fields[8].Name = "classification"
241
MODELInfoDoc.Fields[8].Type = "model.Classification"
242
MODELInfoDoc.Fields[8].Note = ""
243
MODELInfoDoc.Fields[8].Description = "Classification contains classification information about the template."
244
MODELInfoDoc.Fields[8].Comments[encoder.LineComment] = "Classification contains classification information about the template."
245
MODELInfoDoc.Fields[9].Name = "remediation"
246
MODELInfoDoc.Fields[9].Type = "string"
247
MODELInfoDoc.Fields[9].Note = ""
248
MODELInfoDoc.Fields[9].Description = "Remediation steps for the template.\n\nYou can go in-depth here on how to mitigate the problem found by this template."
249
MODELInfoDoc.Fields[9].Comments[encoder.LineComment] = "Remediation steps for the template."
250
251
MODELInfoDoc.Fields[9].AddExample("", "Change the default administrative username and password of Apache ActiveMQ by editing the file jetty-realm.properties")
252
253
STRINGSLICEStringSliceDoc.Type = "stringslice.StringSlice"
254
STRINGSLICEStringSliceDoc.Comments[encoder.LineComment] = " StringSlice represents a single (in-lined) or multiple string value(s)."
255
STRINGSLICEStringSliceDoc.Description = "StringSlice represents a single (in-lined) or multiple string value(s).\n The unmarshaller does not automatically convert in-lined strings to []string, hence the interface{} type is required."
256
257
STRINGSLICEStringSliceDoc.AddExample("", "<username>")
258
259
STRINGSLICEStringSliceDoc.AddExample("Example tags", "cve,cve2019,grafana,auth-bypass,dos")
260
261
STRINGSLICEStringSliceDoc.AddExample("", "CVE-2020-14420")
262
263
STRINGSLICEStringSliceDoc.AddExample("", "CWE-22")
264
STRINGSLICEStringSliceDoc.AppearsIn = []encoder.Appearance{
265
{
266
TypeName: "model.Info",
267
FieldName: "author",
268
},
269
{
270
TypeName: "model.Info",
271
FieldName: "tags",
272
},
273
{
274
TypeName: "model.Classification",
275
FieldName: "cve-id",
276
},
277
{
278
TypeName: "model.Classification",
279
FieldName: "cwe-id",
280
},
281
}
282
STRINGSLICEStringSliceDoc.Fields = make([]encoder.Doc, 0)
283
284
STRINGSLICERawStringSliceDoc.Type = "stringslice.RawStringSlice"
285
STRINGSLICERawStringSliceDoc.Comments[encoder.LineComment] = ""
286
STRINGSLICERawStringSliceDoc.Description = ""
287
288
STRINGSLICERawStringSliceDoc.AddExample("", []string{"https://github.com/strapi/strapi", "https://github.com/getgrav/grav"})
289
STRINGSLICERawStringSliceDoc.AppearsIn = []encoder.Appearance{
290
{
291
TypeName: "model.Info",
292
FieldName: "reference",
293
},
294
}
295
STRINGSLICERawStringSliceDoc.Fields = make([]encoder.Doc, 0)
296
297
SEVERITYHolderDoc.Type = "severity.Holder"
298
SEVERITYHolderDoc.Comments[encoder.LineComment] = " Holder holds a Severity type. Required for un/marshalling purposes"
299
SEVERITYHolderDoc.Description = "Holder holds a Severity type. Required for un/marshalling purposes"
300
SEVERITYHolderDoc.AppearsIn = []encoder.Appearance{
301
{
302
TypeName: "model.Info",
303
FieldName: "severity",
304
},
305
}
306
SEVERITYHolderDoc.Fields = make([]encoder.Doc, 1)
307
SEVERITYHolderDoc.Fields[0].Name = ""
308
SEVERITYHolderDoc.Fields[0].Type = "Severity"
309
SEVERITYHolderDoc.Fields[0].Note = ""
310
SEVERITYHolderDoc.Fields[0].Description = ""
311
SEVERITYHolderDoc.Fields[0].Comments[encoder.LineComment] = ""
312
SEVERITYHolderDoc.Fields[0].EnumFields = []string{
313
"undefined",
314
"info",
315
"low",
316
"medium",
317
"high",
318
"critical",
319
"unknown",
320
}
321
322
MODELClassificationDoc.Type = "model.Classification"
323
MODELClassificationDoc.Comments[encoder.LineComment] = ""
324
MODELClassificationDoc.Description = ""
325
MODELClassificationDoc.AppearsIn = []encoder.Appearance{
326
{
327
TypeName: "model.Info",
328
FieldName: "classification",
329
},
330
}
331
MODELClassificationDoc.Fields = make([]encoder.Doc, 7)
332
MODELClassificationDoc.Fields[0].Name = "cve-id"
333
MODELClassificationDoc.Fields[0].Type = "stringslice.StringSlice"
334
MODELClassificationDoc.Fields[0].Note = ""
335
MODELClassificationDoc.Fields[0].Description = "CVE ID for the template"
336
MODELClassificationDoc.Fields[0].Comments[encoder.LineComment] = "CVE ID for the template"
337
338
MODELClassificationDoc.Fields[0].AddExample("", "CVE-2020-14420")
339
MODELClassificationDoc.Fields[1].Name = "cwe-id"
340
MODELClassificationDoc.Fields[1].Type = "stringslice.StringSlice"
341
MODELClassificationDoc.Fields[1].Note = ""
342
MODELClassificationDoc.Fields[1].Description = "CWE ID for the template."
343
MODELClassificationDoc.Fields[1].Comments[encoder.LineComment] = "CWE ID for the template."
344
345
MODELClassificationDoc.Fields[1].AddExample("", "CWE-22")
346
MODELClassificationDoc.Fields[2].Name = "cvss-metrics"
347
MODELClassificationDoc.Fields[2].Type = "string"
348
MODELClassificationDoc.Fields[2].Note = ""
349
MODELClassificationDoc.Fields[2].Description = "CVSS Metrics for the template."
350
MODELClassificationDoc.Fields[2].Comments[encoder.LineComment] = "CVSS Metrics for the template."
351
352
MODELClassificationDoc.Fields[2].AddExample("", "3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H")
353
MODELClassificationDoc.Fields[3].Name = "cvss-score"
354
MODELClassificationDoc.Fields[3].Type = "float64"
355
MODELClassificationDoc.Fields[3].Note = ""
356
MODELClassificationDoc.Fields[3].Description = "CVSS Score for the template."
357
MODELClassificationDoc.Fields[3].Comments[encoder.LineComment] = "CVSS Score for the template."
358
359
MODELClassificationDoc.Fields[3].AddExample("", "9.8")
360
MODELClassificationDoc.Fields[4].Name = "epss-score"
361
MODELClassificationDoc.Fields[4].Type = "float64"
362
MODELClassificationDoc.Fields[4].Note = ""
363
MODELClassificationDoc.Fields[4].Description = "EPSS Score for the template."
364
MODELClassificationDoc.Fields[4].Comments[encoder.LineComment] = "EPSS Score for the template."
365
366
MODELClassificationDoc.Fields[4].AddExample("", "0.42509")
367
MODELClassificationDoc.Fields[5].Name = "epss-percentile"
368
MODELClassificationDoc.Fields[5].Type = "float64"
369
MODELClassificationDoc.Fields[5].Note = ""
370
MODELClassificationDoc.Fields[5].Description = "EPSS Percentile for the template."
371
MODELClassificationDoc.Fields[5].Comments[encoder.LineComment] = "EPSS Percentile for the template."
372
373
MODELClassificationDoc.Fields[5].AddExample("", "0.42509")
374
MODELClassificationDoc.Fields[6].Name = "cpe"
375
MODELClassificationDoc.Fields[6].Type = "string"
376
MODELClassificationDoc.Fields[6].Note = ""
377
MODELClassificationDoc.Fields[6].Description = "CPE for the template."
378
MODELClassificationDoc.Fields[6].Comments[encoder.LineComment] = "CPE for the template."
379
380
MODELClassificationDoc.Fields[6].AddExample("", "cpe:/a:vendor:product:version")
381
382
HTTPRequestDoc.Type = "http.Request"
383
HTTPRequestDoc.Comments[encoder.LineComment] = " Request contains a http request to be made from a template"
384
HTTPRequestDoc.Description = "Request contains a http request to be made from a template"
385
386
HTTPRequestDoc.AddExample("", exampleNormalHTTPRequest)
387
HTTPRequestDoc.AppearsIn = []encoder.Appearance{
388
{
389
TypeName: "Template",
390
FieldName: "requests",
391
},
392
{
393
TypeName: "Template",
394
FieldName: "http",
395
},
396
}
397
HTTPRequestDoc.PartDefinitions = []encoder.KeyValue{
398
{
399
Key: "template-id",
400
Value: "ID of the template executed",
401
},
402
{
403
Key: "template-info",
404
Value: "Info Block of the template executed",
405
},
406
{
407
Key: "template-path",
408
Value: "Path of the template executed",
409
},
410
{
411
Key: "host",
412
Value: "Host is the input to the template",
413
},
414
{
415
Key: "matched",
416
Value: "Matched is the input which was matched upon",
417
},
418
{
419
Key: "type",
420
Value: "Type is the type of request made",
421
},
422
{
423
Key: "request",
424
Value: "HTTP request made from the client",
425
},
426
{
427
Key: "response",
428
Value: "HTTP response received from server",
429
},
430
{
431
Key: "status_code",
432
Value: "Status Code received from the Server",
433
},
434
{
435
Key: "body",
436
Value: "HTTP response body received from server (default)",
437
},
438
{
439
Key: "content_length",
440
Value: "HTTP Response content length",
441
},
442
{
443
Key: "header,all_headers",
444
Value: "HTTP response headers",
445
},
446
{
447
Key: "duration",
448
Value: "HTTP request time duration",
449
},
450
{
451
Key: "all",
452
Value: "HTTP response body + headers",
453
},
454
{
455
Key: "cookies_from_response",
456
Value: "HTTP response cookies in name:value format",
457
},
458
{
459
Key: "headers_from_response",
460
Value: "HTTP response headers in name:value format",
461
},
462
}
463
HTTPRequestDoc.Fields = make([]encoder.Doc, 38)
464
HTTPRequestDoc.Fields[0].Name = "path"
465
HTTPRequestDoc.Fields[0].Type = "[]string"
466
HTTPRequestDoc.Fields[0].Note = ""
467
HTTPRequestDoc.Fields[0].Description = "Path contains the path/s for the HTTP requests. It supports variables\nas placeholders."
468
HTTPRequestDoc.Fields[0].Comments[encoder.LineComment] = "Path contains the path/s for the HTTP requests. It supports variables"
469
470
HTTPRequestDoc.Fields[0].AddExample("Some example path values", []string{"{{BaseURL}}", "{{BaseURL}}/+CSCOU+/../+CSCOE+/files/file_list.json?path=/sessions"})
471
HTTPRequestDoc.Fields[1].Name = "raw"
472
HTTPRequestDoc.Fields[1].Type = "[]string"
473
HTTPRequestDoc.Fields[1].Note = ""
474
HTTPRequestDoc.Fields[1].Description = "Raw contains HTTP Requests in Raw format."
475
HTTPRequestDoc.Fields[1].Comments[encoder.LineComment] = "Raw contains HTTP Requests in Raw format."
476
477
HTTPRequestDoc.Fields[1].AddExample("Some example raw requests", []string{"GET /etc/passwd HTTP/1.1\nHost:\nContent-Length: 4", "POST /.%0d./.%0d./.%0d./.%0d./bin/sh HTTP/1.1\nHost: {{Hostname}}\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.0\nContent-Length: 1\nConnection: close\n\necho\necho\ncat /etc/passwd 2>&1"})
478
HTTPRequestDoc.Fields[2].Name = "id"
479
HTTPRequestDoc.Fields[2].Type = "string"
480
HTTPRequestDoc.Fields[2].Note = ""
481
HTTPRequestDoc.Fields[2].Description = "ID is the optional id of the request"
482
HTTPRequestDoc.Fields[2].Comments[encoder.LineComment] = " ID is the optional id of the request"
483
HTTPRequestDoc.Fields[3].Name = "name"
484
HTTPRequestDoc.Fields[3].Type = "string"
485
HTTPRequestDoc.Fields[3].Note = ""
486
HTTPRequestDoc.Fields[3].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 multi-request based matchers."
487
HTTPRequestDoc.Fields[3].Comments[encoder.LineComment] = "Name is the optional name of the request."
488
HTTPRequestDoc.Fields[4].Name = "attack"
489
HTTPRequestDoc.Fields[4].Type = "generators.AttackTypeHolder"
490
HTTPRequestDoc.Fields[4].Note = ""
491
HTTPRequestDoc.Fields[4].Description = "Attack is the type of payload combinations to perform.\n\nbatteringram is inserts the same payload into all defined payload positions at once, pitchfork combines multiple payload sets and clusterbomb generates\npermutations and combinations for all payloads."
492
HTTPRequestDoc.Fields[4].Comments[encoder.LineComment] = "Attack is the type of payload combinations to perform."
493
HTTPRequestDoc.Fields[4].Values = []string{
494
"batteringram",
495
"pitchfork",
496
"clusterbomb",
497
}
498
HTTPRequestDoc.Fields[5].Name = "method"
499
HTTPRequestDoc.Fields[5].Type = "HTTPMethodTypeHolder"
500
HTTPRequestDoc.Fields[5].Note = ""
501
HTTPRequestDoc.Fields[5].Description = "Method is the HTTP Request Method."
502
HTTPRequestDoc.Fields[5].Comments[encoder.LineComment] = "Method is the HTTP Request Method."
503
HTTPRequestDoc.Fields[6].Name = "body"
504
HTTPRequestDoc.Fields[6].Type = "string"
505
HTTPRequestDoc.Fields[6].Note = ""
506
HTTPRequestDoc.Fields[6].Description = "Body is an optional parameter which contains HTTP Request body."
507
HTTPRequestDoc.Fields[6].Comments[encoder.LineComment] = "Body is an optional parameter which contains HTTP Request body."
508
509
HTTPRequestDoc.Fields[6].AddExample("Same Body for a Login POST request", "username=test&password=test")
510
HTTPRequestDoc.Fields[7].Name = "payloads"
511
HTTPRequestDoc.Fields[7].Type = "map[string]interface{}"
512
HTTPRequestDoc.Fields[7].Note = ""
513
HTTPRequestDoc.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."
514
HTTPRequestDoc.Fields[7].Comments[encoder.LineComment] = "Payloads contains any payloads for the current request."
515
HTTPRequestDoc.Fields[8].Name = "headers"
516
HTTPRequestDoc.Fields[8].Type = "map[string]string"
517
HTTPRequestDoc.Fields[8].Note = ""
518
HTTPRequestDoc.Fields[8].Description = "Headers contains HTTP Headers to send with the request."
519
HTTPRequestDoc.Fields[8].Comments[encoder.LineComment] = "Headers contains HTTP Headers to send with the request."
520
521
HTTPRequestDoc.Fields[8].AddExample("", map[string]string{"Content-Type": "application/x-www-form-urlencoded", "Content-Length": "1", "Any-Header": "Any-Value"})
522
HTTPRequestDoc.Fields[9].Name = "race_count"
523
HTTPRequestDoc.Fields[9].Type = "int"
524
HTTPRequestDoc.Fields[9].Note = ""
525
HTTPRequestDoc.Fields[9].Description = "RaceCount is the number of times to send a request in Race Condition Attack."
526
HTTPRequestDoc.Fields[9].Comments[encoder.LineComment] = "RaceCount is the number of times to send a request in Race Condition Attack."
527
528
HTTPRequestDoc.Fields[9].AddExample("Send a request 5 times", 5)
529
HTTPRequestDoc.Fields[10].Name = "max-redirects"
530
HTTPRequestDoc.Fields[10].Type = "int"
531
HTTPRequestDoc.Fields[10].Note = ""
532
HTTPRequestDoc.Fields[10].Description = "MaxRedirects is the maximum number of redirects that should be followed."
533
HTTPRequestDoc.Fields[10].Comments[encoder.LineComment] = "MaxRedirects is the maximum number of redirects that should be followed."
534
535
HTTPRequestDoc.Fields[10].AddExample("Follow up to 5 redirects", 5)
536
HTTPRequestDoc.Fields[11].Name = "pipeline-concurrent-connections"
537
HTTPRequestDoc.Fields[11].Type = "int"
538
HTTPRequestDoc.Fields[11].Note = ""
539
HTTPRequestDoc.Fields[11].Description = "PipelineConcurrentConnections is number of connections to create during pipelining."
540
HTTPRequestDoc.Fields[11].Comments[encoder.LineComment] = "PipelineConcurrentConnections is number of connections to create during pipelining."
541
542
HTTPRequestDoc.Fields[11].AddExample("Create 40 concurrent connections", 40)
543
HTTPRequestDoc.Fields[12].Name = "pipeline-requests-per-connection"
544
HTTPRequestDoc.Fields[12].Type = "int"
545
HTTPRequestDoc.Fields[12].Note = ""
546
HTTPRequestDoc.Fields[12].Description = "PipelineRequestsPerConnection is number of requests to send per connection when pipelining."
547
HTTPRequestDoc.Fields[12].Comments[encoder.LineComment] = "PipelineRequestsPerConnection is number of requests to send per connection when pipelining."
548
549
HTTPRequestDoc.Fields[12].AddExample("Send 100 requests per pipeline connection", 100)
550
HTTPRequestDoc.Fields[13].Name = "threads"
551
HTTPRequestDoc.Fields[13].Type = "int"
552
HTTPRequestDoc.Fields[13].Note = ""
553
HTTPRequestDoc.Fields[13].Description = "Threads specifies number of threads to use sending requests. This enables Connection Pooling.\n\nConnection: Close attribute must not be used in request while using threads flag, otherwise\npooling will fail and engine will continue to close connections after requests."
554
HTTPRequestDoc.Fields[13].Comments[encoder.LineComment] = "Threads specifies number of threads to use sending requests. This enables Connection Pooling."
555
556
HTTPRequestDoc.Fields[13].AddExample("Send requests using 10 concurrent threads", 10)
557
HTTPRequestDoc.Fields[14].Name = "max-size"
558
HTTPRequestDoc.Fields[14].Type = "int"
559
HTTPRequestDoc.Fields[14].Note = ""
560
HTTPRequestDoc.Fields[14].Description = "MaxSize is the maximum size of http response body to read in bytes."
561
HTTPRequestDoc.Fields[14].Comments[encoder.LineComment] = "MaxSize is the maximum size of http response body to read in bytes."
562
563
HTTPRequestDoc.Fields[14].AddExample("Read max 2048 bytes of the response", 2048)
564
HTTPRequestDoc.Fields[15].Name = "fuzzing"
565
HTTPRequestDoc.Fields[15].Type = "[]fuzz.Rule"
566
HTTPRequestDoc.Fields[15].Note = ""
567
HTTPRequestDoc.Fields[15].Description = "Fuzzing describes schema to fuzz http requests"
568
HTTPRequestDoc.Fields[15].Comments[encoder.LineComment] = " Fuzzing describes schema to fuzz http requests"
569
HTTPRequestDoc.Fields[16].Name = "analyzer"
570
HTTPRequestDoc.Fields[16].Type = "analyzers.AnalyzerTemplate"
571
HTTPRequestDoc.Fields[16].Note = ""
572
HTTPRequestDoc.Fields[16].Description = "Analyzer is an analyzer to use for matching the response."
573
HTTPRequestDoc.Fields[16].Comments[encoder.LineComment] = "Analyzer is an analyzer to use for matching the response."
574
HTTPRequestDoc.Fields[17].Name = "self-contained"
575
HTTPRequestDoc.Fields[17].Type = "bool"
576
HTTPRequestDoc.Fields[17].Note = ""
577
HTTPRequestDoc.Fields[17].Description = "SelfContained specifies if the request is self-contained."
578
HTTPRequestDoc.Fields[17].Comments[encoder.LineComment] = "SelfContained specifies if the request is self-contained."
579
HTTPRequestDoc.Fields[18].Name = "signature"
580
HTTPRequestDoc.Fields[18].Type = "SignatureTypeHolder"
581
HTTPRequestDoc.Fields[18].Note = ""
582
HTTPRequestDoc.Fields[18].Description = "Signature is the request signature method"
583
HTTPRequestDoc.Fields[18].Comments[encoder.LineComment] = "Signature is the request signature method"
584
HTTPRequestDoc.Fields[18].Values = []string{
585
"AWS",
586
}
587
HTTPRequestDoc.Fields[19].Name = "skip-secret-file"
588
HTTPRequestDoc.Fields[19].Type = "bool"
589
HTTPRequestDoc.Fields[19].Note = ""
590
HTTPRequestDoc.Fields[19].Description = "SkipSecretFile skips the authentication or authorization configured in the secret file."
591
HTTPRequestDoc.Fields[19].Comments[encoder.LineComment] = "SkipSecretFile skips the authentication or authorization configured in the secret file."
592
HTTPRequestDoc.Fields[20].Name = "cookie-reuse"
593
HTTPRequestDoc.Fields[20].Type = "bool"
594
HTTPRequestDoc.Fields[20].Note = ""
595
HTTPRequestDoc.Fields[20].Description = "CookieReuse is an optional setting that enables cookie reuse for\nall requests defined in raw section."
596
HTTPRequestDoc.Fields[20].Comments[encoder.LineComment] = "CookieReuse is an optional setting that enables cookie reuse for"
597
HTTPRequestDoc.Fields[21].Name = "disable-cookie"
598
HTTPRequestDoc.Fields[21].Type = "bool"
599
HTTPRequestDoc.Fields[21].Note = ""
600
HTTPRequestDoc.Fields[21].Description = "DisableCookie is an optional setting that disables cookie reuse"
601
HTTPRequestDoc.Fields[21].Comments[encoder.LineComment] = "DisableCookie is an optional setting that disables cookie reuse"
602
HTTPRequestDoc.Fields[22].Name = "read-all"
603
HTTPRequestDoc.Fields[22].Type = "bool"
604
HTTPRequestDoc.Fields[22].Note = ""
605
HTTPRequestDoc.Fields[22].Description = "Enables force reading of the entire raw unsafe request body ignoring\nany specified content length headers."
606
HTTPRequestDoc.Fields[22].Comments[encoder.LineComment] = "Enables force reading of the entire raw unsafe request body ignoring"
607
HTTPRequestDoc.Fields[23].Name = "redirects"
608
HTTPRequestDoc.Fields[23].Type = "bool"
609
HTTPRequestDoc.Fields[23].Note = ""
610
HTTPRequestDoc.Fields[23].Description = "Redirects specifies whether redirects should be followed by the HTTP Client.\n\nThis can be used in conjunction with `max-redirects` to control the HTTP request redirects."
611
HTTPRequestDoc.Fields[23].Comments[encoder.LineComment] = "Redirects specifies whether redirects should be followed by the HTTP Client."
612
HTTPRequestDoc.Fields[24].Name = "host-redirects"
613
HTTPRequestDoc.Fields[24].Type = "bool"
614
HTTPRequestDoc.Fields[24].Note = ""
615
HTTPRequestDoc.Fields[24].Description = "Redirects specifies whether only redirects to the same host should be followed by the HTTP Client.\n\nThis can be used in conjunction with `max-redirects` to control the HTTP request redirects."
616
HTTPRequestDoc.Fields[24].Comments[encoder.LineComment] = "Redirects specifies whether only redirects to the same host should be followed by the HTTP Client."
617
HTTPRequestDoc.Fields[25].Name = "pipeline"
618
HTTPRequestDoc.Fields[25].Type = "bool"
619
HTTPRequestDoc.Fields[25].Note = ""
620
HTTPRequestDoc.Fields[25].Description = "Pipeline defines if the attack should be performed with HTTP 1.1 Pipelining\n\nAll requests must be idempotent (GET/POST). This can be used for race conditions/billions requests."
621
HTTPRequestDoc.Fields[25].Comments[encoder.LineComment] = "Pipeline defines if the attack should be performed with HTTP 1.1 Pipelining"
622
HTTPRequestDoc.Fields[26].Name = "unsafe"
623
HTTPRequestDoc.Fields[26].Type = "bool"
624
HTTPRequestDoc.Fields[26].Note = ""
625
HTTPRequestDoc.Fields[26].Description = "Unsafe specifies whether to use rawhttp engine for sending Non RFC-Compliant requests.\n\nThis uses the [rawhttp](https://github.com/projectdiscovery/rawhttp) engine to achieve complete\ncontrol over the request, with no normalization performed by the client."
626
HTTPRequestDoc.Fields[26].Comments[encoder.LineComment] = "Unsafe specifies whether to use rawhttp engine for sending Non RFC-Compliant requests."
627
HTTPRequestDoc.Fields[27].Name = "race"
628
HTTPRequestDoc.Fields[27].Type = "bool"
629
HTTPRequestDoc.Fields[27].Note = ""
630
HTTPRequestDoc.Fields[27].Description = "Race determines if all the request have to be attempted at the same time (Race Condition)\n\nThe actual number of requests that will be sent is determined by the `race_count` field."
631
HTTPRequestDoc.Fields[27].Comments[encoder.LineComment] = "Race determines if all the request have to be attempted at the same time (Race Condition)"
632
HTTPRequestDoc.Fields[28].Name = "req-condition"
633
HTTPRequestDoc.Fields[28].Type = "bool"
634
HTTPRequestDoc.Fields[28].Note = ""
635
HTTPRequestDoc.Fields[28].Description = "ReqCondition automatically assigns numbers to requests and preserves their history.\n\nThis allows matching on them later for multi-request conditions."
636
HTTPRequestDoc.Fields[28].Comments[encoder.LineComment] = "ReqCondition automatically assigns numbers to requests and preserves their history."
637
HTTPRequestDoc.Fields[29].Name = "stop-at-first-match"
638
HTTPRequestDoc.Fields[29].Type = "bool"
639
HTTPRequestDoc.Fields[29].Note = ""
640
HTTPRequestDoc.Fields[29].Description = "StopAtFirstMatch stops the execution of the requests and template as soon as a match is found."
641
HTTPRequestDoc.Fields[29].Comments[encoder.LineComment] = "StopAtFirstMatch stops the execution of the requests and template as soon as a match is found."
642
HTTPRequestDoc.Fields[30].Name = "skip-variables-check"
643
HTTPRequestDoc.Fields[30].Type = "bool"
644
HTTPRequestDoc.Fields[30].Note = ""
645
HTTPRequestDoc.Fields[30].Description = "SkipVariablesCheck skips the check for unresolved variables in request"
646
HTTPRequestDoc.Fields[30].Comments[encoder.LineComment] = "SkipVariablesCheck skips the check for unresolved variables in request"
647
HTTPRequestDoc.Fields[31].Name = "iterate-all"
648
HTTPRequestDoc.Fields[31].Type = "bool"
649
HTTPRequestDoc.Fields[31].Note = ""
650
HTTPRequestDoc.Fields[31].Description = "IterateAll iterates all the values extracted from internal extractors"
651
HTTPRequestDoc.Fields[31].Comments[encoder.LineComment] = "IterateAll iterates all the values extracted from internal extractors"
652
HTTPRequestDoc.Fields[32].Name = "digest-username"
653
HTTPRequestDoc.Fields[32].Type = "string"
654
HTTPRequestDoc.Fields[32].Note = ""
655
HTTPRequestDoc.Fields[32].Description = "DigestAuthUsername specifies the username for digest authentication"
656
HTTPRequestDoc.Fields[32].Comments[encoder.LineComment] = "DigestAuthUsername specifies the username for digest authentication"
657
HTTPRequestDoc.Fields[33].Name = "digest-password"
658
HTTPRequestDoc.Fields[33].Type = "string"
659
HTTPRequestDoc.Fields[33].Note = ""
660
HTTPRequestDoc.Fields[33].Description = "DigestAuthPassword specifies the password for digest authentication"
661
HTTPRequestDoc.Fields[33].Comments[encoder.LineComment] = "DigestAuthPassword specifies the password for digest authentication"
662
HTTPRequestDoc.Fields[34].Name = "disable-path-automerge"
663
HTTPRequestDoc.Fields[34].Type = "bool"
664
HTTPRequestDoc.Fields[34].Note = ""
665
HTTPRequestDoc.Fields[34].Description = "DisablePathAutomerge disables merging target url path with raw request path"
666
HTTPRequestDoc.Fields[34].Comments[encoder.LineComment] = "DisablePathAutomerge disables merging target url path with raw request path"
667
HTTPRequestDoc.Fields[35].Name = "pre-condition"
668
HTTPRequestDoc.Fields[35].Type = "[]matchers.Matcher"
669
HTTPRequestDoc.Fields[35].Note = ""
670
HTTPRequestDoc.Fields[35].Description = "Fuzz PreCondition is matcher-like field to check if fuzzing should be performed on this request or not"
671
HTTPRequestDoc.Fields[35].Comments[encoder.LineComment] = "Fuzz PreCondition is matcher-like field to check if fuzzing should be performed on this request or not"
672
HTTPRequestDoc.Fields[36].Name = "pre-condition-operator"
673
HTTPRequestDoc.Fields[36].Type = "string"
674
HTTPRequestDoc.Fields[36].Note = ""
675
HTTPRequestDoc.Fields[36].Description = "FuzzPreConditionOperator is the operator between multiple PreConditions for fuzzing Default is OR"
676
HTTPRequestDoc.Fields[36].Comments[encoder.LineComment] = "FuzzPreConditionOperator is the operator between multiple PreConditions for fuzzing Default is OR"
677
HTTPRequestDoc.Fields[37].Name = "global-matchers"
678
HTTPRequestDoc.Fields[37].Type = "bool"
679
HTTPRequestDoc.Fields[37].Note = ""
680
HTTPRequestDoc.Fields[37].Description = "GlobalMatchers marks matchers as static and applies globally to all result events from other templates"
681
HTTPRequestDoc.Fields[37].Comments[encoder.LineComment] = "GlobalMatchers marks matchers as static and applies globally to all result events from other templates"
682
683
GENERATORSAttackTypeHolderDoc.Type = "generators.AttackTypeHolder"
684
GENERATORSAttackTypeHolderDoc.Comments[encoder.LineComment] = " AttackTypeHolder is used to hold internal type of the protocol"
685
GENERATORSAttackTypeHolderDoc.Description = "AttackTypeHolder is used to hold internal type of the protocol"
686
GENERATORSAttackTypeHolderDoc.AppearsIn = []encoder.Appearance{
687
{
688
TypeName: "http.Request",
689
FieldName: "attack",
690
},
691
{
692
TypeName: "dns.Request",
693
FieldName: "attack",
694
},
695
{
696
TypeName: "network.Request",
697
FieldName: "attack",
698
},
699
{
700
TypeName: "headless.Request",
701
FieldName: "attack",
702
},
703
{
704
TypeName: "websocket.Request",
705
FieldName: "attack",
706
},
707
{
708
TypeName: "javascript.Request",
709
FieldName: "attack",
710
},
711
}
712
GENERATORSAttackTypeHolderDoc.Fields = make([]encoder.Doc, 1)
713
GENERATORSAttackTypeHolderDoc.Fields[0].Name = ""
714
GENERATORSAttackTypeHolderDoc.Fields[0].Type = "AttackType"
715
GENERATORSAttackTypeHolderDoc.Fields[0].Note = ""
716
GENERATORSAttackTypeHolderDoc.Fields[0].Description = ""
717
GENERATORSAttackTypeHolderDoc.Fields[0].Comments[encoder.LineComment] = ""
718
GENERATORSAttackTypeHolderDoc.Fields[0].EnumFields = []string{
719
"batteringram",
720
"pitchfork",
721
"clusterbomb",
722
}
723
724
HTTPMethodTypeHolderDoc.Type = "HTTPMethodTypeHolder"
725
HTTPMethodTypeHolderDoc.Comments[encoder.LineComment] = " HTTPMethodTypeHolder is used to hold internal type of the HTTP Method"
726
HTTPMethodTypeHolderDoc.Description = "HTTPMethodTypeHolder is used to hold internal type of the HTTP Method"
727
HTTPMethodTypeHolderDoc.AppearsIn = []encoder.Appearance{
728
{
729
TypeName: "http.Request",
730
FieldName: "method",
731
},
732
}
733
HTTPMethodTypeHolderDoc.Fields = make([]encoder.Doc, 1)
734
HTTPMethodTypeHolderDoc.Fields[0].Name = ""
735
HTTPMethodTypeHolderDoc.Fields[0].Type = "HTTPMethodType"
736
HTTPMethodTypeHolderDoc.Fields[0].Note = ""
737
HTTPMethodTypeHolderDoc.Fields[0].Description = ""
738
HTTPMethodTypeHolderDoc.Fields[0].Comments[encoder.LineComment] = ""
739
HTTPMethodTypeHolderDoc.Fields[0].EnumFields = []string{
740
"GET",
741
"HEAD",
742
"POST",
743
"PUT",
744
"DELETE",
745
"CONNECT",
746
"OPTIONS",
747
"TRACE",
748
"PATCH",
749
"PURGE",
750
"Debug",
751
}
752
753
FUZZRuleDoc.Type = "fuzz.Rule"
754
FUZZRuleDoc.Comments[encoder.LineComment] = " Rule is a single rule which describes how to fuzz the request"
755
FUZZRuleDoc.Description = "Rule is a single rule which describes how to fuzz the request"
756
FUZZRuleDoc.AppearsIn = []encoder.Appearance{
757
{
758
TypeName: "http.Request",
759
FieldName: "fuzzing",
760
},
761
{
762
TypeName: "headless.Request",
763
FieldName: "fuzzing",
764
},
765
}
766
FUZZRuleDoc.Fields = make([]encoder.Doc, 9)
767
FUZZRuleDoc.Fields[0].Name = "type"
768
FUZZRuleDoc.Fields[0].Type = "string"
769
FUZZRuleDoc.Fields[0].Note = ""
770
FUZZRuleDoc.Fields[0].Description = "Type is the type of fuzzing rule to perform.\n\nreplace replaces the values entirely. prefix prefixes the value. postfix postfixes the value\nand infix places between the values."
771
FUZZRuleDoc.Fields[0].Comments[encoder.LineComment] = "Type is the type of fuzzing rule to perform."
772
FUZZRuleDoc.Fields[0].Values = []string{
773
"replace",
774
"prefix",
775
"postfix",
776
"infix",
777
}
778
FUZZRuleDoc.Fields[1].Name = "part"
779
FUZZRuleDoc.Fields[1].Type = "string"
780
FUZZRuleDoc.Fields[1].Note = ""
781
FUZZRuleDoc.Fields[1].Description = "Part is the part of request to fuzz."
782
FUZZRuleDoc.Fields[1].Comments[encoder.LineComment] = "Part is the part of request to fuzz."
783
FUZZRuleDoc.Fields[1].Values = []string{
784
"query",
785
"header",
786
"path",
787
"body",
788
"cookie",
789
"request",
790
}
791
FUZZRuleDoc.Fields[2].Name = "parts"
792
FUZZRuleDoc.Fields[2].Type = "[]string"
793
FUZZRuleDoc.Fields[2].Note = ""
794
FUZZRuleDoc.Fields[2].Description = "Parts is the list of parts to fuzz. If multiple parts need to be\ndefined while excluding some, this should be used instead of singular part."
795
FUZZRuleDoc.Fields[2].Comments[encoder.LineComment] = "Parts is the list of parts to fuzz. If multiple parts need to be"
796
FUZZRuleDoc.Fields[2].Values = []string{
797
"query",
798
"header",
799
"path",
800
"body",
801
"cookie",
802
"request",
803
}
804
FUZZRuleDoc.Fields[3].Name = "mode"
805
FUZZRuleDoc.Fields[3].Type = "string"
806
FUZZRuleDoc.Fields[3].Note = ""
807
FUZZRuleDoc.Fields[3].Description = "Mode is the mode of fuzzing to perform.\n\nsingle fuzzes one value at a time. multiple fuzzes all values at same time."
808
FUZZRuleDoc.Fields[3].Comments[encoder.LineComment] = "Mode is the mode of fuzzing to perform."
809
FUZZRuleDoc.Fields[3].Values = []string{
810
"single",
811
"multiple",
812
}
813
FUZZRuleDoc.Fields[4].Name = "keys"
814
FUZZRuleDoc.Fields[4].Type = "[]string"
815
FUZZRuleDoc.Fields[4].Note = ""
816
FUZZRuleDoc.Fields[4].Description = "Keys is the optional list of key named parameters to fuzz."
817
FUZZRuleDoc.Fields[4].Comments[encoder.LineComment] = "Keys is the optional list of key named parameters to fuzz."
818
819
FUZZRuleDoc.Fields[4].AddExample("Examples of keys", []string{"url", "file", "host"})
820
FUZZRuleDoc.Fields[5].Name = "keys-regex"
821
FUZZRuleDoc.Fields[5].Type = "[]string"
822
FUZZRuleDoc.Fields[5].Note = ""
823
FUZZRuleDoc.Fields[5].Description = "KeysRegex is the optional list of regex key parameters to fuzz."
824
FUZZRuleDoc.Fields[5].Comments[encoder.LineComment] = "KeysRegex is the optional list of regex key parameters to fuzz."
825
826
FUZZRuleDoc.Fields[5].AddExample("Examples of key regex", []string{"url.*"})
827
FUZZRuleDoc.Fields[6].Name = "values"
828
FUZZRuleDoc.Fields[6].Type = "[]string"
829
FUZZRuleDoc.Fields[6].Note = ""
830
FUZZRuleDoc.Fields[6].Description = "Values is the optional list of regex value parameters to fuzz."
831
FUZZRuleDoc.Fields[6].Comments[encoder.LineComment] = "Values is the optional list of regex value parameters to fuzz."
832
833
FUZZRuleDoc.Fields[6].AddExample("Examples of value regex", []string{"https?://.*"})
834
FUZZRuleDoc.Fields[7].Name = "fuzz"
835
FUZZRuleDoc.Fields[7].Type = "SliceOrMapSlice"
836
FUZZRuleDoc.Fields[7].Note = ""
837
FUZZRuleDoc.Fields[7].Description = "description: |\n Fuzz is the list of payloads to perform substitutions with.\n examples:\n - name: Examples of fuzz\n value: >\n []string{\"{{ssrf}}\", \"{{interactsh-url}}\", \"example-value\"}\n or\n x-header: 1\n x-header: 2"
838
FUZZRuleDoc.Fields[7].Comments[encoder.LineComment] = " description: |"
839
FUZZRuleDoc.Fields[8].Name = "replace-regex"
840
FUZZRuleDoc.Fields[8].Type = "string"
841
FUZZRuleDoc.Fields[8].Note = ""
842
FUZZRuleDoc.Fields[8].Description = "replace-regex is regex for regex-replace rule type\nit is only required for replace-regex rule type"
843
FUZZRuleDoc.Fields[8].Comments[encoder.LineComment] = "replace-regex is regex for regex-replace rule type"
844
845
SliceOrMapSliceDoc.Type = "SliceOrMapSlice"
846
SliceOrMapSliceDoc.Comments[encoder.LineComment] = ""
847
SliceOrMapSliceDoc.Description = ""
848
SliceOrMapSliceDoc.AppearsIn = []encoder.Appearance{
849
{
850
TypeName: "fuzz.Rule",
851
FieldName: "fuzz",
852
},
853
}
854
SliceOrMapSliceDoc.Fields = make([]encoder.Doc, 0)
855
856
ANALYZERSAnalyzerTemplateDoc.Type = "analyzers.AnalyzerTemplate"
857
ANALYZERSAnalyzerTemplateDoc.Comments[encoder.LineComment] = " AnalyzerTemplate is the template for the analyzer"
858
ANALYZERSAnalyzerTemplateDoc.Description = "AnalyzerTemplate is the template for the analyzer"
859
ANALYZERSAnalyzerTemplateDoc.AppearsIn = []encoder.Appearance{
860
{
861
TypeName: "http.Request",
862
FieldName: "analyzer",
863
},
864
}
865
ANALYZERSAnalyzerTemplateDoc.Fields = make([]encoder.Doc, 2)
866
ANALYZERSAnalyzerTemplateDoc.Fields[0].Name = "name"
867
ANALYZERSAnalyzerTemplateDoc.Fields[0].Type = "string"
868
ANALYZERSAnalyzerTemplateDoc.Fields[0].Note = ""
869
ANALYZERSAnalyzerTemplateDoc.Fields[0].Description = "Name is the name of the analyzer to use"
870
ANALYZERSAnalyzerTemplateDoc.Fields[0].Comments[encoder.LineComment] = "Name is the name of the analyzer to use"
871
ANALYZERSAnalyzerTemplateDoc.Fields[0].Values = []string{
872
"time_delay",
873
}
874
ANALYZERSAnalyzerTemplateDoc.Fields[1].Name = "parameters"
875
ANALYZERSAnalyzerTemplateDoc.Fields[1].Type = "map[string]interface{}"
876
ANALYZERSAnalyzerTemplateDoc.Fields[1].Note = ""
877
ANALYZERSAnalyzerTemplateDoc.Fields[1].Description = "Parameters is the parameters for the analyzer\n\nParameters are different for each analyzer. For example, you can customize\ntime_delay analyzer with sleep_duration, time_slope_error_range, etc. Refer\nto the docs for each analyzer to get an idea about parameters."
878
ANALYZERSAnalyzerTemplateDoc.Fields[1].Comments[encoder.LineComment] = "Parameters is the parameters for the analyzer"
879
880
SignatureTypeHolderDoc.Type = "SignatureTypeHolder"
881
SignatureTypeHolderDoc.Comments[encoder.LineComment] = " SignatureTypeHolder is used to hold internal type of the signature"
882
SignatureTypeHolderDoc.Description = "SignatureTypeHolder is used to hold internal type of the signature"
883
SignatureTypeHolderDoc.AppearsIn = []encoder.Appearance{
884
{
885
TypeName: "http.Request",
886
FieldName: "signature",
887
},
888
}
889
SignatureTypeHolderDoc.Fields = make([]encoder.Doc, 0)
890
891
MATCHERSMatcherDoc.Type = "matchers.Matcher"
892
MATCHERSMatcherDoc.Comments[encoder.LineComment] = " Matcher is used to match a part in the output from a protocol."
893
MATCHERSMatcherDoc.Description = "Matcher is used to match a part in the output from a protocol."
894
MATCHERSMatcherDoc.AppearsIn = []encoder.Appearance{
895
{
896
TypeName: "http.Request",
897
FieldName: "pre-condition",
898
},
899
}
900
MATCHERSMatcherDoc.Fields = make([]encoder.Doc, 16)
901
MATCHERSMatcherDoc.Fields[0].Name = "type"
902
MATCHERSMatcherDoc.Fields[0].Type = "MatcherTypeHolder"
903
MATCHERSMatcherDoc.Fields[0].Note = ""
904
MATCHERSMatcherDoc.Fields[0].Description = "Type is the type of the matcher."
905
MATCHERSMatcherDoc.Fields[0].Comments[encoder.LineComment] = "Type is the type of the matcher."
906
MATCHERSMatcherDoc.Fields[1].Name = "condition"
907
MATCHERSMatcherDoc.Fields[1].Type = "string"
908
MATCHERSMatcherDoc.Fields[1].Note = ""
909
MATCHERSMatcherDoc.Fields[1].Description = "Condition is the optional condition between two matcher variables. By default,\nthe condition is assumed to be OR."
910
MATCHERSMatcherDoc.Fields[1].Comments[encoder.LineComment] = "Condition is the optional condition between two matcher variables. By default,"
911
MATCHERSMatcherDoc.Fields[1].Values = []string{
912
"and",
913
"or",
914
}
915
MATCHERSMatcherDoc.Fields[2].Name = "part"
916
MATCHERSMatcherDoc.Fields[2].Type = "string"
917
MATCHERSMatcherDoc.Fields[2].Note = ""
918
MATCHERSMatcherDoc.Fields[2].Description = "Part is the part of the request response to match data from.\n\nEach protocol exposes a lot of different parts which are well\ndocumented in docs for each request type."
919
MATCHERSMatcherDoc.Fields[2].Comments[encoder.LineComment] = "Part is the part of the request response to match data from."
920
921
MATCHERSMatcherDoc.Fields[2].AddExample("", "body")
922
923
MATCHERSMatcherDoc.Fields[2].AddExample("", "raw")
924
MATCHERSMatcherDoc.Fields[3].Name = "negative"
925
MATCHERSMatcherDoc.Fields[3].Type = "bool"
926
MATCHERSMatcherDoc.Fields[3].Note = ""
927
MATCHERSMatcherDoc.Fields[3].Description = "Negative specifies if the match should be reversed\nIt will only match if the condition is not true."
928
MATCHERSMatcherDoc.Fields[3].Comments[encoder.LineComment] = "Negative specifies if the match should be reversed"
929
MATCHERSMatcherDoc.Fields[4].Name = "name"
930
MATCHERSMatcherDoc.Fields[4].Type = "string"
931
MATCHERSMatcherDoc.Fields[4].Note = ""
932
MATCHERSMatcherDoc.Fields[4].Description = "Name of the matcher. Name should be lowercase and must not contain\nspaces or underscores (_)."
933
MATCHERSMatcherDoc.Fields[4].Comments[encoder.LineComment] = "Name of the matcher. Name should be lowercase and must not contain"
934
935
MATCHERSMatcherDoc.Fields[4].AddExample("", "cookie-matcher")
936
MATCHERSMatcherDoc.Fields[5].Name = "status"
937
MATCHERSMatcherDoc.Fields[5].Type = "[]int"
938
MATCHERSMatcherDoc.Fields[5].Note = ""
939
MATCHERSMatcherDoc.Fields[5].Description = "Status are the acceptable status codes for the response."
940
MATCHERSMatcherDoc.Fields[5].Comments[encoder.LineComment] = "Status are the acceptable status codes for the response."
941
942
MATCHERSMatcherDoc.Fields[5].AddExample("", []int{200, 302})
943
MATCHERSMatcherDoc.Fields[6].Name = "size"
944
MATCHERSMatcherDoc.Fields[6].Type = "[]int"
945
MATCHERSMatcherDoc.Fields[6].Note = ""
946
MATCHERSMatcherDoc.Fields[6].Description = "Size is the acceptable size for the response"
947
MATCHERSMatcherDoc.Fields[6].Comments[encoder.LineComment] = "Size is the acceptable size for the response"
948
949
MATCHERSMatcherDoc.Fields[6].AddExample("", []int{3029, 2042})
950
MATCHERSMatcherDoc.Fields[7].Name = "words"
951
MATCHERSMatcherDoc.Fields[7].Type = "[]string"
952
MATCHERSMatcherDoc.Fields[7].Note = ""
953
MATCHERSMatcherDoc.Fields[7].Description = "Words contains word patterns required to be present in the response part."
954
MATCHERSMatcherDoc.Fields[7].Comments[encoder.LineComment] = "Words contains word patterns required to be present in the response part."
955
956
MATCHERSMatcherDoc.Fields[7].AddExample("Match for Outlook mail protection domain", []string{"mail.protection.outlook.com"})
957
958
MATCHERSMatcherDoc.Fields[7].AddExample("Match for application/json in response headers", []string{"application/json"})
959
MATCHERSMatcherDoc.Fields[8].Name = "regex"
960
MATCHERSMatcherDoc.Fields[8].Type = "[]string"
961
MATCHERSMatcherDoc.Fields[8].Note = ""
962
MATCHERSMatcherDoc.Fields[8].Description = "Regex contains Regular Expression patterns required to be present in the response part."
963
MATCHERSMatcherDoc.Fields[8].Comments[encoder.LineComment] = "Regex contains Regular Expression patterns required to be present in the response part."
964
965
MATCHERSMatcherDoc.Fields[8].AddExample("Match for Linkerd Service via Regex", []string{`(?mi)^Via\\s*?:.*?linkerd.*$`})
966
967
MATCHERSMatcherDoc.Fields[8].AddExample("Match for Open Redirect via Location header", []string{`(?m)^(?:Location\\s*?:\\s*?)(?:https?://|//)?(?:[a-zA-Z0-9\\-_\\.@]*)example\\.com.*$`})
968
MATCHERSMatcherDoc.Fields[9].Name = "binary"
969
MATCHERSMatcherDoc.Fields[9].Type = "[]string"
970
MATCHERSMatcherDoc.Fields[9].Note = ""
971
MATCHERSMatcherDoc.Fields[9].Description = "Binary are the binary patterns required to be present in the response part."
972
MATCHERSMatcherDoc.Fields[9].Comments[encoder.LineComment] = "Binary are the binary patterns required to be present in the response part."
973
974
MATCHERSMatcherDoc.Fields[9].AddExample("Match for Springboot Heapdump Actuator \"JAVA PROFILE\", \"HPROF\", \"Gunzip magic byte\"", []string{"4a4156412050524f46494c45", "4850524f46", "1f8b080000000000"})
975
976
MATCHERSMatcherDoc.Fields[9].AddExample("Match for 7zip files", []string{"377ABCAF271C"})
977
MATCHERSMatcherDoc.Fields[10].Name = "dsl"
978
MATCHERSMatcherDoc.Fields[10].Type = "[]string"
979
MATCHERSMatcherDoc.Fields[10].Note = ""
980
MATCHERSMatcherDoc.Fields[10].Description = "DSL are the dsl expressions that will be evaluated as part of nuclei matching rules.\nA list of these helper functions are available [here](https://nuclei.projectdiscovery.io/templating-guide/helper-functions/)."
981
MATCHERSMatcherDoc.Fields[10].Comments[encoder.LineComment] = "DSL are the dsl expressions that will be evaluated as part of nuclei matching rules."
982
983
MATCHERSMatcherDoc.Fields[10].AddExample("DSL Matcher for package.json file", []string{"contains(body, 'packages') && contains(tolower(all_headers), 'application/octet-stream') && status_code == 200"})
984
985
MATCHERSMatcherDoc.Fields[10].AddExample("DSL Matcher for missing strict transport security header", []string{"!contains(tolower(all_headers), ''strict-transport-security'')"})
986
MATCHERSMatcherDoc.Fields[11].Name = "xpath"
987
MATCHERSMatcherDoc.Fields[11].Type = "[]string"
988
MATCHERSMatcherDoc.Fields[11].Note = ""
989
MATCHERSMatcherDoc.Fields[11].Description = "XPath are the xpath queries expressions that will be evaluated against the response part."
990
MATCHERSMatcherDoc.Fields[11].Comments[encoder.LineComment] = "XPath are the xpath queries expressions that will be evaluated against the response part."
991
992
MATCHERSMatcherDoc.Fields[11].AddExample("XPath Matcher to check a title", []string{"/html/head/title[contains(text(), 'How to Find XPath')]"})
993
994
MATCHERSMatcherDoc.Fields[11].AddExample("XPath Matcher for finding links with target=\"_blank\"", []string{"//a[@target=\"_blank\"]"})
995
MATCHERSMatcherDoc.Fields[12].Name = "encoding"
996
MATCHERSMatcherDoc.Fields[12].Type = "string"
997
MATCHERSMatcherDoc.Fields[12].Note = ""
998
MATCHERSMatcherDoc.Fields[12].Description = "Encoding specifies the encoding for the words field if any."
999
MATCHERSMatcherDoc.Fields[12].Comments[encoder.LineComment] = "Encoding specifies the encoding for the words field if any."
1000
MATCHERSMatcherDoc.Fields[12].Values = []string{
1001
"hex",
1002
}
1003
MATCHERSMatcherDoc.Fields[13].Name = "case-insensitive"
1004
MATCHERSMatcherDoc.Fields[13].Type = "bool"
1005
MATCHERSMatcherDoc.Fields[13].Note = ""
1006
MATCHERSMatcherDoc.Fields[13].Description = "CaseInsensitive enables case-insensitive matches. Default is false."
1007
MATCHERSMatcherDoc.Fields[13].Comments[encoder.LineComment] = "CaseInsensitive enables case-insensitive matches. Default is false."
1008
MATCHERSMatcherDoc.Fields[13].Values = []string{
1009
"false",
1010
"true",
1011
}
1012
MATCHERSMatcherDoc.Fields[14].Name = "match-all"
1013
MATCHERSMatcherDoc.Fields[14].Type = "bool"
1014
MATCHERSMatcherDoc.Fields[14].Note = ""
1015
MATCHERSMatcherDoc.Fields[14].Description = "MatchAll enables matching for all matcher values. Default is false."
1016
MATCHERSMatcherDoc.Fields[14].Comments[encoder.LineComment] = "MatchAll enables matching for all matcher values. Default is false."
1017
MATCHERSMatcherDoc.Fields[14].Values = []string{
1018
"false",
1019
"true",
1020
}
1021
MATCHERSMatcherDoc.Fields[15].Name = "internal"
1022
MATCHERSMatcherDoc.Fields[15].Type = "bool"
1023
MATCHERSMatcherDoc.Fields[15].Note = ""
1024
MATCHERSMatcherDoc.Fields[15].Description = "description: |\n Internal when true hides the matcher from output. Default is false.\n It is meant to be used in multiprotocol / flow templates to create internal matcher condition without printing it in output.\n or other similar use cases.\n values:\n - false\n - true"
1025
MATCHERSMatcherDoc.Fields[15].Comments[encoder.LineComment] = " description: |"
1026
1027
MatcherTypeHolderDoc.Type = "MatcherTypeHolder"
1028
MatcherTypeHolderDoc.Comments[encoder.LineComment] = " MatcherTypeHolder is used to hold internal type of the matcher"
1029
MatcherTypeHolderDoc.Description = "MatcherTypeHolder is used to hold internal type of the matcher"
1030
MatcherTypeHolderDoc.AppearsIn = []encoder.Appearance{
1031
{
1032
TypeName: "matchers.Matcher",
1033
FieldName: "type",
1034
},
1035
}
1036
MatcherTypeHolderDoc.Fields = make([]encoder.Doc, 1)
1037
MatcherTypeHolderDoc.Fields[0].Name = ""
1038
MatcherTypeHolderDoc.Fields[0].Type = "MatcherType"
1039
MatcherTypeHolderDoc.Fields[0].Note = ""
1040
MatcherTypeHolderDoc.Fields[0].Description = ""
1041
MatcherTypeHolderDoc.Fields[0].Comments[encoder.LineComment] = ""
1042
MatcherTypeHolderDoc.Fields[0].EnumFields = []string{
1043
"word",
1044
"regex",
1045
"binary",
1046
"status",
1047
"size",
1048
"dsl",
1049
"xpath",
1050
}
1051
1052
DNSRequestDoc.Type = "dns.Request"
1053
DNSRequestDoc.Comments[encoder.LineComment] = " Request contains a DNS protocol request to be made from a template"
1054
DNSRequestDoc.Description = "Request contains a DNS protocol request to be made from a template"
1055
1056
DNSRequestDoc.AddExample("", exampleNormalDNSRequest)
1057
DNSRequestDoc.AppearsIn = []encoder.Appearance{
1058
{
1059
TypeName: "Template",
1060
FieldName: "dns",
1061
},
1062
}
1063
DNSRequestDoc.PartDefinitions = []encoder.KeyValue{
1064
{
1065
Key: "template-id",
1066
Value: "ID of the template executed",
1067
},
1068
{
1069
Key: "template-info",
1070
Value: "Info Block of the template executed",
1071
},
1072
{
1073
Key: "template-path",
1074
Value: "Path of the template executed",
1075
},
1076
{
1077
Key: "host",
1078
Value: "Host is the input to the template",
1079
},
1080
{
1081
Key: "matched",
1082
Value: "Matched is the input which was matched upon",
1083
},
1084
{
1085
Key: "request",
1086
Value: "Request contains the DNS request in text format",
1087
},
1088
{
1089
Key: "type",
1090
Value: "Type is the type of request made",
1091
},
1092
{
1093
Key: "rcode",
1094
Value: "Rcode field returned for the DNS request",
1095
},
1096
{
1097
Key: "question",
1098
Value: "Question contains the DNS question field",
1099
},
1100
{
1101
Key: "extra",
1102
Value: "Extra contains the DNS response extra field",
1103
},
1104
{
1105
Key: "answer",
1106
Value: "Answer contains the DNS response answer field",
1107
},
1108
{
1109
Key: "ns",
1110
Value: "NS contains the DNS response NS field",
1111
},
1112
{
1113
Key: "raw,body,all",
1114
Value: "Raw contains the raw DNS response (default)",
1115
},
1116
{
1117
Key: "trace",
1118
Value: "Trace contains trace data for DNS request if enabled",
1119
},
1120
}
1121
DNSRequestDoc.Fields = make([]encoder.Doc, 12)
1122
DNSRequestDoc.Fields[0].Name = "id"
1123
DNSRequestDoc.Fields[0].Type = "string"
1124
DNSRequestDoc.Fields[0].Note = ""
1125
DNSRequestDoc.Fields[0].Description = "ID is the optional id of the request"
1126
DNSRequestDoc.Fields[0].Comments[encoder.LineComment] = " ID is the optional id of the request"
1127
DNSRequestDoc.Fields[1].Name = "name"
1128
DNSRequestDoc.Fields[1].Type = "string"
1129
DNSRequestDoc.Fields[1].Note = ""
1130
DNSRequestDoc.Fields[1].Description = "Name is the Hostname to make DNS request for.\n\nGenerally, it is set to {{FQDN}} which is the domain we get from input."
1131
DNSRequestDoc.Fields[1].Comments[encoder.LineComment] = "Name is the Hostname to make DNS request for."
1132
1133
DNSRequestDoc.Fields[1].AddExample("", "{{FQDN}}")
1134
DNSRequestDoc.Fields[2].Name = "type"
1135
DNSRequestDoc.Fields[2].Type = "DNSRequestTypeHolder"
1136
DNSRequestDoc.Fields[2].Note = ""
1137
DNSRequestDoc.Fields[2].Description = "RequestType is the type of DNS request to make."
1138
DNSRequestDoc.Fields[2].Comments[encoder.LineComment] = "RequestType is the type of DNS request to make."
1139
DNSRequestDoc.Fields[3].Name = "class"
1140
DNSRequestDoc.Fields[3].Type = "string"
1141
DNSRequestDoc.Fields[3].Note = ""
1142
DNSRequestDoc.Fields[3].Description = "Class is the class of the DNS request.\n\nUsually it's enough to just leave it as INET."
1143
DNSRequestDoc.Fields[3].Comments[encoder.LineComment] = "Class is the class of the DNS request."
1144
DNSRequestDoc.Fields[3].Values = []string{
1145
"inet",
1146
"csnet",
1147
"chaos",
1148
"hesiod",
1149
"none",
1150
"any",
1151
}
1152
DNSRequestDoc.Fields[4].Name = "retries"
1153
DNSRequestDoc.Fields[4].Type = "int"
1154
DNSRequestDoc.Fields[4].Note = ""
1155
DNSRequestDoc.Fields[4].Description = "Retries is the number of retries for the DNS request"
1156
DNSRequestDoc.Fields[4].Comments[encoder.LineComment] = "Retries is the number of retries for the DNS request"
1157
1158
DNSRequestDoc.Fields[4].AddExample("Use a retry of 3 to 5 generally", 5)
1159
DNSRequestDoc.Fields[5].Name = "trace"
1160
DNSRequestDoc.Fields[5].Type = "bool"
1161
DNSRequestDoc.Fields[5].Note = ""
1162
DNSRequestDoc.Fields[5].Description = "Trace performs a trace operation for the target."
1163
DNSRequestDoc.Fields[5].Comments[encoder.LineComment] = "Trace performs a trace operation for the target."
1164
DNSRequestDoc.Fields[6].Name = "trace-max-recursion"
1165
DNSRequestDoc.Fields[6].Type = "int"
1166
DNSRequestDoc.Fields[6].Note = ""
1167
DNSRequestDoc.Fields[6].Description = "TraceMaxRecursion is the number of max recursion allowed for trace operations"
1168
DNSRequestDoc.Fields[6].Comments[encoder.LineComment] = "TraceMaxRecursion is the number of max recursion allowed for trace operations"
1169
1170
DNSRequestDoc.Fields[6].AddExample("Use a retry of 100 to 150 generally", 100)
1171
DNSRequestDoc.Fields[7].Name = "attack"
1172
DNSRequestDoc.Fields[7].Type = "generators.AttackTypeHolder"
1173
DNSRequestDoc.Fields[7].Note = ""
1174
DNSRequestDoc.Fields[7].Description = "Attack is the type of payload combinations to perform.\n\nBatteringram is inserts the same payload into all defined payload positions at once, pitchfork combines multiple payload sets and clusterbomb generates\npermutations and combinations for all payloads."
1175
DNSRequestDoc.Fields[7].Comments[encoder.LineComment] = "Attack is the type of payload combinations to perform."
1176
DNSRequestDoc.Fields[8].Name = "payloads"
1177
DNSRequestDoc.Fields[8].Type = "map[string]interface{}"
1178
DNSRequestDoc.Fields[8].Note = ""
1179
DNSRequestDoc.Fields[8].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."
1180
DNSRequestDoc.Fields[8].Comments[encoder.LineComment] = "Payloads contains any payloads for the current request."
1181
DNSRequestDoc.Fields[9].Name = "threads"
1182
DNSRequestDoc.Fields[9].Type = "int"
1183
DNSRequestDoc.Fields[9].Note = ""
1184
DNSRequestDoc.Fields[9].Description = "Threads to use when sending iterating over payloads"
1185
DNSRequestDoc.Fields[9].Comments[encoder.LineComment] = "Threads to use when sending iterating over payloads"
1186
1187
DNSRequestDoc.Fields[9].AddExample("Send requests using 10 concurrent threads", 10)
1188
DNSRequestDoc.Fields[10].Name = "recursion"
1189
DNSRequestDoc.Fields[10].Type = "dns.bool"
1190
DNSRequestDoc.Fields[10].Note = ""
1191
DNSRequestDoc.Fields[10].Description = "Recursion determines if resolver should recurse all records to get fresh results."
1192
DNSRequestDoc.Fields[10].Comments[encoder.LineComment] = "Recursion determines if resolver should recurse all records to get fresh results."
1193
DNSRequestDoc.Fields[11].Name = "resolvers"
1194
DNSRequestDoc.Fields[11].Type = "[]string"
1195
DNSRequestDoc.Fields[11].Note = ""
1196
DNSRequestDoc.Fields[11].Description = "Resolvers to use for the dns requests"
1197
DNSRequestDoc.Fields[11].Comments[encoder.LineComment] = " Resolvers to use for the dns requests"
1198
1199
DNSRequestTypeHolderDoc.Type = "DNSRequestTypeHolder"
1200
DNSRequestTypeHolderDoc.Comments[encoder.LineComment] = " DNSRequestTypeHolder is used to hold internal type of the DNS type"
1201
DNSRequestTypeHolderDoc.Description = "DNSRequestTypeHolder is used to hold internal type of the DNS type"
1202
DNSRequestTypeHolderDoc.AppearsIn = []encoder.Appearance{
1203
{
1204
TypeName: "dns.Request",
1205
FieldName: "type",
1206
},
1207
}
1208
DNSRequestTypeHolderDoc.Fields = make([]encoder.Doc, 1)
1209
DNSRequestTypeHolderDoc.Fields[0].Name = ""
1210
DNSRequestTypeHolderDoc.Fields[0].Type = "DNSRequestType"
1211
DNSRequestTypeHolderDoc.Fields[0].Note = ""
1212
DNSRequestTypeHolderDoc.Fields[0].Description = ""
1213
DNSRequestTypeHolderDoc.Fields[0].Comments[encoder.LineComment] = ""
1214
DNSRequestTypeHolderDoc.Fields[0].EnumFields = []string{
1215
"A",
1216
"NS",
1217
"DS",
1218
"CNAME",
1219
"SOA",
1220
"PTR",
1221
"MX",
1222
"TXT",
1223
"AAAA",
1224
"CAA",
1225
"TLSA",
1226
"ANY",
1227
"SRV",
1228
}
1229
1230
FILERequestDoc.Type = "file.Request"
1231
FILERequestDoc.Comments[encoder.LineComment] = " Request contains a File matching mechanism for local disk operations."
1232
FILERequestDoc.Description = "Request contains a File matching mechanism for local disk operations."
1233
1234
FILERequestDoc.AddExample("", exampleNormalFileRequest)
1235
FILERequestDoc.AppearsIn = []encoder.Appearance{
1236
{
1237
TypeName: "Template",
1238
FieldName: "file",
1239
},
1240
}
1241
FILERequestDoc.PartDefinitions = []encoder.KeyValue{
1242
{
1243
Key: "template-id",
1244
Value: "ID of the template executed",
1245
},
1246
{
1247
Key: "template-info",
1248
Value: "Info Block of the template executed",
1249
},
1250
{
1251
Key: "template-path",
1252
Value: "Path of the template executed",
1253
},
1254
{
1255
Key: "matched",
1256
Value: "Matched is the input which was matched upon",
1257
},
1258
{
1259
Key: "path",
1260
Value: "Path is the path of file on local filesystem",
1261
},
1262
{
1263
Key: "type",
1264
Value: "Type is the type of request made",
1265
},
1266
{
1267
Key: "raw,body,all,data",
1268
Value: "Raw contains the raw file contents",
1269
},
1270
}
1271
FILERequestDoc.Fields = make([]encoder.Doc, 7)
1272
FILERequestDoc.Fields[0].Name = "extensions"
1273
FILERequestDoc.Fields[0].Type = "[]string"
1274
FILERequestDoc.Fields[0].Note = ""
1275
FILERequestDoc.Fields[0].Description = "Extensions is the list of extensions or mime types to perform matching on."
1276
FILERequestDoc.Fields[0].Comments[encoder.LineComment] = "Extensions is the list of extensions or mime types to perform matching on."
1277
1278
FILERequestDoc.Fields[0].AddExample("", []string{".txt", ".go", ".json"})
1279
FILERequestDoc.Fields[1].Name = "denylist"
1280
FILERequestDoc.Fields[1].Type = "[]string"
1281
FILERequestDoc.Fields[1].Note = ""
1282
FILERequestDoc.Fields[1].Description = "DenyList is the list of file, directories, mime types or extensions to deny during matching.\n\nBy default, it contains some non-interesting extensions that are hardcoded\nin nuclei."
1283
FILERequestDoc.Fields[1].Comments[encoder.LineComment] = "DenyList is the list of file, directories, mime types or extensions to deny during matching."
1284
1285
FILERequestDoc.Fields[1].AddExample("", []string{".avi", ".mov", ".mp3"})
1286
FILERequestDoc.Fields[2].Name = "id"
1287
FILERequestDoc.Fields[2].Type = "string"
1288
FILERequestDoc.Fields[2].Note = ""
1289
FILERequestDoc.Fields[2].Description = "ID is the optional id of the request"
1290
FILERequestDoc.Fields[2].Comments[encoder.LineComment] = " ID is the optional id of the request"
1291
FILERequestDoc.Fields[3].Name = "max-size"
1292
FILERequestDoc.Fields[3].Type = "string"
1293
FILERequestDoc.Fields[3].Note = ""
1294
FILERequestDoc.Fields[3].Description = "MaxSize is the maximum size of the file to run request on.\n\nBy default, nuclei will process 1 GB of content and not go more than that.\nIt can be set to much lower or higher depending on use.\nIf set to \"no\" then all content will be processed"
1295
FILERequestDoc.Fields[3].Comments[encoder.LineComment] = "MaxSize is the maximum size of the file to run request on."
1296
1297
FILERequestDoc.Fields[3].AddExample("", "5Mb")
1298
FILERequestDoc.Fields[4].Name = "archive"
1299
FILERequestDoc.Fields[4].Type = "bool"
1300
FILERequestDoc.Fields[4].Note = ""
1301
FILERequestDoc.Fields[4].Description = "elaborates archives"
1302
FILERequestDoc.Fields[4].Comments[encoder.LineComment] = "elaborates archives"
1303
FILERequestDoc.Fields[5].Name = "mime-type"
1304
FILERequestDoc.Fields[5].Type = "bool"
1305
FILERequestDoc.Fields[5].Note = ""
1306
FILERequestDoc.Fields[5].Description = "enables mime types check"
1307
FILERequestDoc.Fields[5].Comments[encoder.LineComment] = "enables mime types check"
1308
FILERequestDoc.Fields[6].Name = "no-recursive"
1309
FILERequestDoc.Fields[6].Type = "bool"
1310
FILERequestDoc.Fields[6].Note = ""
1311
FILERequestDoc.Fields[6].Description = "NoRecursive specifies whether to not do recursive checks if folders are provided."
1312
FILERequestDoc.Fields[6].Comments[encoder.LineComment] = "NoRecursive specifies whether to not do recursive checks if folders are provided."
1313
1314
NETWORKRequestDoc.Type = "network.Request"
1315
NETWORKRequestDoc.Comments[encoder.LineComment] = " Request contains a Network protocol request to be made from a template"
1316
NETWORKRequestDoc.Description = "Request contains a Network protocol request to be made from a template"
1317
1318
NETWORKRequestDoc.AddExample("", exampleNormalNetworkRequest)
1319
NETWORKRequestDoc.AppearsIn = []encoder.Appearance{
1320
{
1321
TypeName: "Template",
1322
FieldName: "network",
1323
},
1324
{
1325
TypeName: "Template",
1326
FieldName: "tcp",
1327
},
1328
}
1329
NETWORKRequestDoc.PartDefinitions = []encoder.KeyValue{
1330
{
1331
Key: "template-id",
1332
Value: "ID of the template executed",
1333
},
1334
{
1335
Key: "template-info",
1336
Value: "Info Block of the template executed",
1337
},
1338
{
1339
Key: "template-path",
1340
Value: "Path of the template executed",
1341
},
1342
{
1343
Key: "host",
1344
Value: "Host is the input to the template",
1345
},
1346
{
1347
Key: "matched",
1348
Value: "Matched is the input which was matched upon",
1349
},
1350
{
1351
Key: "type",
1352
Value: "Type is the type of request made",
1353
},
1354
{
1355
Key: "request",
1356
Value: "Network request made from the client",
1357
},
1358
{
1359
Key: "body,all,data",
1360
Value: "Network response received from server (default)",
1361
},
1362
{
1363
Key: "raw",
1364
Value: "Full Network protocol data",
1365
},
1366
}
1367
NETWORKRequestDoc.Fields = make([]encoder.Doc, 11)
1368
NETWORKRequestDoc.Fields[0].Name = "id"
1369
NETWORKRequestDoc.Fields[0].Type = "string"
1370
NETWORKRequestDoc.Fields[0].Note = ""
1371
NETWORKRequestDoc.Fields[0].Description = "ID is the optional id of the request"
1372
NETWORKRequestDoc.Fields[0].Comments[encoder.LineComment] = " ID is the optional id of the request"
1373
NETWORKRequestDoc.Fields[1].Name = "host"
1374
NETWORKRequestDoc.Fields[1].Type = "[]string"
1375
NETWORKRequestDoc.Fields[1].Note = ""
1376
NETWORKRequestDoc.Fields[1].Description = "Host to send network requests to.\n\nUsually it's set to `{{Hostname}}`. If you want to enable TLS for\nTCP Connection, you can use `tls://{{Hostname}}`."
1377
NETWORKRequestDoc.Fields[1].Comments[encoder.LineComment] = "Host to send network requests to."
1378
1379
NETWORKRequestDoc.Fields[1].AddExample("", []string{"{{Hostname}}"})
1380
NETWORKRequestDoc.Fields[2].Name = "attack"
1381
NETWORKRequestDoc.Fields[2].Type = "generators.AttackTypeHolder"
1382
NETWORKRequestDoc.Fields[2].Note = ""
1383
NETWORKRequestDoc.Fields[2].Description = "Attack is the type of payload combinations to perform.\n\nBatteringram is inserts the same payload into all defined payload positions at once, pitchfork combines multiple payload sets and clusterbomb generates\npermutations and combinations for all payloads."
1384
NETWORKRequestDoc.Fields[2].Comments[encoder.LineComment] = "Attack is the type of payload combinations to perform."
1385
NETWORKRequestDoc.Fields[3].Name = "payloads"
1386
NETWORKRequestDoc.Fields[3].Type = "map[string]interface{}"
1387
NETWORKRequestDoc.Fields[3].Note = ""
1388
NETWORKRequestDoc.Fields[3].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."
1389
NETWORKRequestDoc.Fields[3].Comments[encoder.LineComment] = "Payloads contains any payloads for the current request."
1390
NETWORKRequestDoc.Fields[4].Name = "threads"
1391
NETWORKRequestDoc.Fields[4].Type = "int"
1392
NETWORKRequestDoc.Fields[4].Note = ""
1393
NETWORKRequestDoc.Fields[4].Description = "Threads specifies number of threads to use sending requests. This enables Connection Pooling.\n\nConnection: Close attribute must not be used in request while using threads flag, otherwise\npooling will fail and engine will continue to close connections after requests."
1394
NETWORKRequestDoc.Fields[4].Comments[encoder.LineComment] = "Threads specifies number of threads to use sending requests. This enables Connection Pooling."
1395
1396
NETWORKRequestDoc.Fields[4].AddExample("Send requests using 10 concurrent threads", 10)
1397
NETWORKRequestDoc.Fields[5].Name = "inputs"
1398
NETWORKRequestDoc.Fields[5].Type = "[]network.Input"
1399
NETWORKRequestDoc.Fields[5].Note = ""
1400
NETWORKRequestDoc.Fields[5].Description = "Inputs contains inputs for the network socket"
1401
NETWORKRequestDoc.Fields[5].Comments[encoder.LineComment] = "Inputs contains inputs for the network socket"
1402
NETWORKRequestDoc.Fields[6].Name = "port"
1403
NETWORKRequestDoc.Fields[6].Type = "string"
1404
NETWORKRequestDoc.Fields[6].Note = ""
1405
NETWORKRequestDoc.Fields[6].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"
1406
NETWORKRequestDoc.Fields[6].Comments[encoder.LineComment] = " description: |"
1407
NETWORKRequestDoc.Fields[7].Name = "exclude-ports"
1408
NETWORKRequestDoc.Fields[7].Type = "string"
1409
NETWORKRequestDoc.Fields[7].Note = ""
1410
NETWORKRequestDoc.Fields[7].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"
1411
NETWORKRequestDoc.Fields[7].Comments[encoder.LineComment] = " description: |"
1412
NETWORKRequestDoc.Fields[8].Name = "read-size"
1413
NETWORKRequestDoc.Fields[8].Type = "int"
1414
NETWORKRequestDoc.Fields[8].Note = ""
1415
NETWORKRequestDoc.Fields[8].Description = "ReadSize is the size of response to read at the end\n\nDefault value for read-size is 1024."
1416
NETWORKRequestDoc.Fields[8].Comments[encoder.LineComment] = "ReadSize is the size of response to read at the end"
1417
1418
NETWORKRequestDoc.Fields[8].AddExample("", 2048)
1419
NETWORKRequestDoc.Fields[9].Name = "read-all"
1420
NETWORKRequestDoc.Fields[9].Type = "bool"
1421
NETWORKRequestDoc.Fields[9].Note = ""
1422
NETWORKRequestDoc.Fields[9].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."
1423
NETWORKRequestDoc.Fields[9].Comments[encoder.LineComment] = "ReadAll determines if the data stream should be read till the end regardless of the size"
1424
1425
NETWORKRequestDoc.Fields[9].AddExample("", false)
1426
NETWORKRequestDoc.Fields[10].Name = "stop-at-first-match"
1427
NETWORKRequestDoc.Fields[10].Type = "bool"
1428
NETWORKRequestDoc.Fields[10].Note = ""
1429
NETWORKRequestDoc.Fields[10].Description = "StopAtFirstMatch stops the execution of the requests and template as soon as a match is found."
1430
NETWORKRequestDoc.Fields[10].Comments[encoder.LineComment] = "StopAtFirstMatch stops the execution of the requests and template as soon as a match is found."
1431
1432
NETWORKInputDoc.Type = "network.Input"
1433
NETWORKInputDoc.Comments[encoder.LineComment] = ""
1434
NETWORKInputDoc.Description = ""
1435
NETWORKInputDoc.AppearsIn = []encoder.Appearance{
1436
{
1437
TypeName: "network.Request",
1438
FieldName: "inputs",
1439
},
1440
}
1441
NETWORKInputDoc.Fields = make([]encoder.Doc, 4)
1442
NETWORKInputDoc.Fields[0].Name = "data"
1443
NETWORKInputDoc.Fields[0].Type = "string"
1444
NETWORKInputDoc.Fields[0].Note = ""
1445
NETWORKInputDoc.Fields[0].Description = "Data is the data to send as the input.\n\nIt supports DSL Helper Functions as well as normal expressions."
1446
NETWORKInputDoc.Fields[0].Comments[encoder.LineComment] = "Data is the data to send as the input."
1447
1448
NETWORKInputDoc.Fields[0].AddExample("", "TEST")
1449
1450
NETWORKInputDoc.Fields[0].AddExample("", "hex_decode('50494e47')")
1451
NETWORKInputDoc.Fields[1].Name = "type"
1452
NETWORKInputDoc.Fields[1].Type = "NetworkInputTypeHolder"
1453
NETWORKInputDoc.Fields[1].Note = ""
1454
NETWORKInputDoc.Fields[1].Description = "Type is the type of input specified in `data` field.\n\nDefault value is text, but hex can be used for hex formatted data."
1455
NETWORKInputDoc.Fields[1].Comments[encoder.LineComment] = "Type is the type of input specified in `data` field."
1456
NETWORKInputDoc.Fields[1].Values = []string{
1457
"hex",
1458
"text",
1459
}
1460
NETWORKInputDoc.Fields[2].Name = "read"
1461
NETWORKInputDoc.Fields[2].Type = "int"
1462
NETWORKInputDoc.Fields[2].Note = ""
1463
NETWORKInputDoc.Fields[2].Description = "Read is the number of bytes to read from socket.\n\nThis can be used for protocols which expect an immediate response. You can\nread and write responses one after another and eventually perform matching\non every data captured with `name` attribute.\n\nThe [network docs](https://nuclei.projectdiscovery.io/templating-guide/protocols/network/) highlight more on how to do this."
1464
NETWORKInputDoc.Fields[2].Comments[encoder.LineComment] = "Read is the number of bytes to read from socket."
1465
1466
NETWORKInputDoc.Fields[2].AddExample("", 1024)
1467
NETWORKInputDoc.Fields[3].Name = "name"
1468
NETWORKInputDoc.Fields[3].Type = "string"
1469
NETWORKInputDoc.Fields[3].Note = ""
1470
NETWORKInputDoc.Fields[3].Description = "Name is the optional name of the data read to provide matching on."
1471
NETWORKInputDoc.Fields[3].Comments[encoder.LineComment] = "Name is the optional name of the data read to provide matching on."
1472
1473
NETWORKInputDoc.Fields[3].AddExample("", "prefix")
1474
1475
NetworkInputTypeHolderDoc.Type = "NetworkInputTypeHolder"
1476
NetworkInputTypeHolderDoc.Comments[encoder.LineComment] = " NetworkInputTypeHolder is used to hold internal type of the Network type"
1477
NetworkInputTypeHolderDoc.Description = "NetworkInputTypeHolder is used to hold internal type of the Network type"
1478
NetworkInputTypeHolderDoc.AppearsIn = []encoder.Appearance{
1479
{
1480
TypeName: "network.Input",
1481
FieldName: "type",
1482
},
1483
}
1484
NetworkInputTypeHolderDoc.Fields = make([]encoder.Doc, 1)
1485
NetworkInputTypeHolderDoc.Fields[0].Name = ""
1486
NetworkInputTypeHolderDoc.Fields[0].Type = "NetworkInputType"
1487
NetworkInputTypeHolderDoc.Fields[0].Note = ""
1488
NetworkInputTypeHolderDoc.Fields[0].Description = ""
1489
NetworkInputTypeHolderDoc.Fields[0].Comments[encoder.LineComment] = ""
1490
NetworkInputTypeHolderDoc.Fields[0].EnumFields = []string{
1491
"hex",
1492
"text",
1493
}
1494
1495
HEADLESSRequestDoc.Type = "headless.Request"
1496
HEADLESSRequestDoc.Comments[encoder.LineComment] = " Request contains a Headless protocol request to be made from a template"
1497
HEADLESSRequestDoc.Description = "Request contains a Headless protocol request to be made from a template"
1498
HEADLESSRequestDoc.AppearsIn = []encoder.Appearance{
1499
{
1500
TypeName: "Template",
1501
FieldName: "headless",
1502
},
1503
}
1504
HEADLESSRequestDoc.PartDefinitions = []encoder.KeyValue{
1505
{
1506
Key: "template-id",
1507
Value: "ID of the template executed",
1508
},
1509
{
1510
Key: "template-info",
1511
Value: "Info Block of the template executed",
1512
},
1513
{
1514
Key: "template-path",
1515
Value: "Path of the template executed",
1516
},
1517
{
1518
Key: "host",
1519
Value: "Host is the input to the template",
1520
},
1521
{
1522
Key: "matched",
1523
Value: "Matched is the input which was matched upon",
1524
},
1525
{
1526
Key: "type",
1527
Value: "Type is the type of request made",
1528
},
1529
{
1530
Key: "req",
1531
Value: "Headless request made from the client",
1532
},
1533
{
1534
Key: "resp,body,data",
1535
Value: "Headless response received from client (default)",
1536
},
1537
}
1538
HEADLESSRequestDoc.Fields = make([]encoder.Doc, 10)
1539
HEADLESSRequestDoc.Fields[0].Name = "id"
1540
HEADLESSRequestDoc.Fields[0].Type = "string"
1541
HEADLESSRequestDoc.Fields[0].Note = ""
1542
HEADLESSRequestDoc.Fields[0].Description = "ID is the optional id of the request"
1543
HEADLESSRequestDoc.Fields[0].Comments[encoder.LineComment] = " ID is the optional id of the request"
1544
HEADLESSRequestDoc.Fields[1].Name = "attack"
1545
HEADLESSRequestDoc.Fields[1].Type = "generators.AttackTypeHolder"
1546
HEADLESSRequestDoc.Fields[1].Note = ""
1547
HEADLESSRequestDoc.Fields[1].Description = "Attack is the type of payload combinations to perform.\n\nBatteringram is inserts the same payload into all defined payload positions at once, pitchfork combines multiple payload sets and clusterbomb generates\npermutations and combinations for all payloads."
1548
HEADLESSRequestDoc.Fields[1].Comments[encoder.LineComment] = "Attack is the type of payload combinations to perform."
1549
HEADLESSRequestDoc.Fields[2].Name = "payloads"
1550
HEADLESSRequestDoc.Fields[2].Type = "map[string]interface{}"
1551
HEADLESSRequestDoc.Fields[2].Note = ""
1552
HEADLESSRequestDoc.Fields[2].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."
1553
HEADLESSRequestDoc.Fields[2].Comments[encoder.LineComment] = "Payloads contains any payloads for the current request."
1554
HEADLESSRequestDoc.Fields[3].Name = "steps"
1555
HEADLESSRequestDoc.Fields[3].Type = "[]engine.Action"
1556
HEADLESSRequestDoc.Fields[3].Note = ""
1557
HEADLESSRequestDoc.Fields[3].Description = "Steps is the list of actions to run for headless request"
1558
HEADLESSRequestDoc.Fields[3].Comments[encoder.LineComment] = "Steps is the list of actions to run for headless request"
1559
HEADLESSRequestDoc.Fields[4].Name = "user_agent"
1560
HEADLESSRequestDoc.Fields[4].Type = "userAgent.UserAgentHolder"
1561
HEADLESSRequestDoc.Fields[4].Note = ""
1562
HEADLESSRequestDoc.Fields[4].Description = "descriptions: |\n User-Agent is the type of user-agent to use for the request."
1563
HEADLESSRequestDoc.Fields[4].Comments[encoder.LineComment] = " descriptions: |"
1564
HEADLESSRequestDoc.Fields[5].Name = "custom_user_agent"
1565
HEADLESSRequestDoc.Fields[5].Type = "string"
1566
HEADLESSRequestDoc.Fields[5].Note = ""
1567
HEADLESSRequestDoc.Fields[5].Description = "description: |\n If UserAgent is set to custom, customUserAgent is the custom user-agent to use for the request."
1568
HEADLESSRequestDoc.Fields[5].Comments[encoder.LineComment] = " description: |"
1569
HEADLESSRequestDoc.Fields[6].Name = "stop-at-first-match"
1570
HEADLESSRequestDoc.Fields[6].Type = "bool"
1571
HEADLESSRequestDoc.Fields[6].Note = ""
1572
HEADLESSRequestDoc.Fields[6].Description = "StopAtFirstMatch stops the execution of the requests and template as soon as a match is found."
1573
HEADLESSRequestDoc.Fields[6].Comments[encoder.LineComment] = "StopAtFirstMatch stops the execution of the requests and template as soon as a match is found."
1574
HEADLESSRequestDoc.Fields[7].Name = "fuzzing"
1575
HEADLESSRequestDoc.Fields[7].Type = "[]fuzz.Rule"
1576
HEADLESSRequestDoc.Fields[7].Note = ""
1577
HEADLESSRequestDoc.Fields[7].Description = "Fuzzing describes schema to fuzz headless requests"
1578
HEADLESSRequestDoc.Fields[7].Comments[encoder.LineComment] = " Fuzzing describes schema to fuzz headless requests"
1579
HEADLESSRequestDoc.Fields[8].Name = "cookie-reuse"
1580
HEADLESSRequestDoc.Fields[8].Type = "bool"
1581
HEADLESSRequestDoc.Fields[8].Note = ""
1582
HEADLESSRequestDoc.Fields[8].Description = "CookieReuse is an optional setting that enables cookie reuse"
1583
HEADLESSRequestDoc.Fields[8].Comments[encoder.LineComment] = "CookieReuse is an optional setting that enables cookie reuse"
1584
HEADLESSRequestDoc.Fields[9].Name = "disable-cookie"
1585
HEADLESSRequestDoc.Fields[9].Type = "bool"
1586
HEADLESSRequestDoc.Fields[9].Note = ""
1587
HEADLESSRequestDoc.Fields[9].Description = "DisableCookie is an optional setting that disables cookie reuse"
1588
HEADLESSRequestDoc.Fields[9].Comments[encoder.LineComment] = "DisableCookie is an optional setting that disables cookie reuse"
1589
1590
ENGINEActionDoc.Type = "engine.Action"
1591
ENGINEActionDoc.Comments[encoder.LineComment] = " Action is an action taken by the browser to reach a navigation"
1592
ENGINEActionDoc.Description = "Action is an action taken by the browser to reach a navigation\n\n Each step that the browser executes is an action. Most navigations\n usually start from the ActionLoadURL event, and further navigations\n are discovered on the found page. We also keep track and only\n scrape new navigation from pages we haven't crawled yet."
1593
ENGINEActionDoc.AppearsIn = []encoder.Appearance{
1594
{
1595
TypeName: "headless.Request",
1596
FieldName: "steps",
1597
},
1598
}
1599
ENGINEActionDoc.Fields = make([]encoder.Doc, 4)
1600
ENGINEActionDoc.Fields[0].Name = "args"
1601
ENGINEActionDoc.Fields[0].Type = "map[string]string"
1602
ENGINEActionDoc.Fields[0].Note = ""
1603
ENGINEActionDoc.Fields[0].Description = "Args contain arguments for the headless action.\nPer action arguments are described in detail [here](https://nuclei.projectdiscovery.io/templating-guide/protocols/headless/)."
1604
ENGINEActionDoc.Fields[0].Comments[encoder.LineComment] = "Args contain arguments for the headless action."
1605
ENGINEActionDoc.Fields[1].Name = "name"
1606
ENGINEActionDoc.Fields[1].Type = "string"
1607
ENGINEActionDoc.Fields[1].Note = ""
1608
ENGINEActionDoc.Fields[1].Description = "Name is the name assigned to the headless action.\n\nThis can be used to execute code, for instance in browser\nDOM using script action, and get the result in a variable\nwhich can be matched upon by nuclei. An Example template [here](https://github.com/projectdiscovery/nuclei-templates/blob/main/headless/prototype-pollution-check.yaml)."
1609
ENGINEActionDoc.Fields[1].Comments[encoder.LineComment] = "Name is the name assigned to the headless action."
1610
ENGINEActionDoc.Fields[2].Name = "description"
1611
ENGINEActionDoc.Fields[2].Type = "string"
1612
ENGINEActionDoc.Fields[2].Note = ""
1613
ENGINEActionDoc.Fields[2].Description = "Description is the optional description of the headless action"
1614
ENGINEActionDoc.Fields[2].Comments[encoder.LineComment] = "Description is the optional description of the headless action"
1615
ENGINEActionDoc.Fields[3].Name = "action"
1616
ENGINEActionDoc.Fields[3].Type = "ActionTypeHolder"
1617
ENGINEActionDoc.Fields[3].Note = ""
1618
ENGINEActionDoc.Fields[3].Description = "Action is the type of the action to perform."
1619
ENGINEActionDoc.Fields[3].Comments[encoder.LineComment] = "Action is the type of the action to perform."
1620
1621
ActionTypeHolderDoc.Type = "ActionTypeHolder"
1622
ActionTypeHolderDoc.Comments[encoder.LineComment] = " ActionTypeHolder is used to hold internal type of the action"
1623
ActionTypeHolderDoc.Description = "ActionTypeHolder is used to hold internal type of the action"
1624
ActionTypeHolderDoc.AppearsIn = []encoder.Appearance{
1625
{
1626
TypeName: "engine.Action",
1627
FieldName: "action",
1628
},
1629
}
1630
ActionTypeHolderDoc.Fields = make([]encoder.Doc, 1)
1631
ActionTypeHolderDoc.Fields[0].Name = ""
1632
ActionTypeHolderDoc.Fields[0].Type = "ActionType"
1633
ActionTypeHolderDoc.Fields[0].Note = ""
1634
ActionTypeHolderDoc.Fields[0].Description = ""
1635
ActionTypeHolderDoc.Fields[0].Comments[encoder.LineComment] = ""
1636
ActionTypeHolderDoc.Fields[0].EnumFields = []string{
1637
"navigate",
1638
"script",
1639
"click",
1640
"rightclick",
1641
"text",
1642
"screenshot",
1643
"time",
1644
"select",
1645
"files",
1646
"waitdom",
1647
"waitfcp",
1648
"waitfmp",
1649
"waitidle",
1650
"waitload",
1651
"waitstable",
1652
"getresource",
1653
"extract",
1654
"setmethod",
1655
"addheader",
1656
"setheader",
1657
"deleteheader",
1658
"setbody",
1659
"waitevent",
1660
"dialog",
1661
"keyboard",
1662
"debug",
1663
"sleep",
1664
"waitvisible",
1665
}
1666
1667
USERAGENTUserAgentHolderDoc.Type = "userAgent.UserAgentHolder"
1668
USERAGENTUserAgentHolderDoc.Comments[encoder.LineComment] = " UserAgentHolder holds a UserAgent type. Required for un/marshalling purposes"
1669
USERAGENTUserAgentHolderDoc.Description = "UserAgentHolder holds a UserAgent type. Required for un/marshalling purposes"
1670
USERAGENTUserAgentHolderDoc.AppearsIn = []encoder.Appearance{
1671
{
1672
TypeName: "headless.Request",
1673
FieldName: "user_agent",
1674
},
1675
}
1676
USERAGENTUserAgentHolderDoc.Fields = make([]encoder.Doc, 1)
1677
USERAGENTUserAgentHolderDoc.Fields[0].Name = ""
1678
USERAGENTUserAgentHolderDoc.Fields[0].Type = "UserAgent"
1679
USERAGENTUserAgentHolderDoc.Fields[0].Note = ""
1680
USERAGENTUserAgentHolderDoc.Fields[0].Description = ""
1681
USERAGENTUserAgentHolderDoc.Fields[0].Comments[encoder.LineComment] = ""
1682
USERAGENTUserAgentHolderDoc.Fields[0].EnumFields = []string{
1683
"random",
1684
"off",
1685
"default",
1686
"custom",
1687
}
1688
1689
SSLRequestDoc.Type = "ssl.Request"
1690
SSLRequestDoc.Comments[encoder.LineComment] = " Request is a request for the SSL protocol"
1691
SSLRequestDoc.Description = "Request is a request for the SSL protocol"
1692
SSLRequestDoc.AppearsIn = []encoder.Appearance{
1693
{
1694
TypeName: "Template",
1695
FieldName: "ssl",
1696
},
1697
}
1698
SSLRequestDoc.PartDefinitions = []encoder.KeyValue{
1699
{
1700
Key: "template-id",
1701
Value: "ID of the template executed",
1702
},
1703
{
1704
Key: "template-info",
1705
Value: "Info Block of the template executed",
1706
},
1707
{
1708
Key: "template-path",
1709
Value: "Path of the template executed",
1710
},
1711
{
1712
Key: "host",
1713
Value: "Host is the input to the template",
1714
},
1715
{
1716
Key: "port",
1717
Value: "Port is the port of the host",
1718
},
1719
{
1720
Key: "matched",
1721
Value: "Matched is the input which was matched upon",
1722
},
1723
{
1724
Key: "type",
1725
Value: "Type is the type of request made",
1726
},
1727
{
1728
Key: "timestamp",
1729
Value: "Timestamp is the time when the request was made",
1730
},
1731
{
1732
Key: "response",
1733
Value: "JSON SSL protocol handshake details",
1734
},
1735
{
1736
Key: "cipher",
1737
Value: "Cipher is the encryption algorithm used",
1738
},
1739
{
1740
Key: "domains",
1741
Value: "Domains are the list of domain names in the certificate",
1742
},
1743
{
1744
Key: "fingerprint_hash",
1745
Value: "Fingerprint hash is the unique identifier of the certificate",
1746
},
1747
{
1748
Key: "ip",
1749
Value: "IP is the IP address of the server",
1750
},
1751
{
1752
Key: "issuer_cn",
1753
Value: "Issuer CN is the common name of the certificate issuer",
1754
},
1755
{
1756
Key: "issuer_dn",
1757
Value: "Issuer DN is the distinguished name of the certificate issuer",
1758
},
1759
{
1760
Key: "issuer_org",
1761
Value: "Issuer organization is the organization of the certificate issuer",
1762
},
1763
{
1764
Key: "not_after",
1765
Value: "Timestamp after which the remote cert expires",
1766
},
1767
{
1768
Key: "not_before",
1769
Value: "Timestamp before which the certificate is not valid",
1770
},
1771
{
1772
Key: "probe_status",
1773
Value: "Probe status indicates if the probe was successful",
1774
},
1775
{
1776
Key: "serial",
1777
Value: "Serial is the serial number of the certificate",
1778
},
1779
{
1780
Key: "sni",
1781
Value: "SNI is the server name indication used in the handshake",
1782
},
1783
{
1784
Key: "subject_an",
1785
Value: "Subject AN is the list of subject alternative names",
1786
},
1787
{
1788
Key: "subject_cn",
1789
Value: "Subject CN is the common name of the certificate subject",
1790
},
1791
{
1792
Key: "subject_dn",
1793
Value: "Subject DN is the distinguished name of the certificate subject",
1794
},
1795
{
1796
Key: "subject_org",
1797
Value: "Subject organization is the organization of the certificate subject",
1798
},
1799
{
1800
Key: "tls_connection",
1801
Value: "TLS connection is the type of TLS connection used",
1802
},
1803
{
1804
Key: "tls_version",
1805
Value: "TLS version is the version of the TLS protocol used",
1806
},
1807
}
1808
SSLRequestDoc.Fields = make([]encoder.Doc, 9)
1809
SSLRequestDoc.Fields[0].Name = "id"
1810
SSLRequestDoc.Fields[0].Type = "string"
1811
SSLRequestDoc.Fields[0].Note = ""
1812
SSLRequestDoc.Fields[0].Description = "ID is the optional id of the request"
1813
SSLRequestDoc.Fields[0].Comments[encoder.LineComment] = " ID is the optional id of the request"
1814
SSLRequestDoc.Fields[1].Name = "address"
1815
SSLRequestDoc.Fields[1].Type = "string"
1816
SSLRequestDoc.Fields[1].Note = ""
1817
SSLRequestDoc.Fields[1].Description = "Address contains address for the request"
1818
SSLRequestDoc.Fields[1].Comments[encoder.LineComment] = "Address contains address for the request"
1819
SSLRequestDoc.Fields[2].Name = "min_version"
1820
SSLRequestDoc.Fields[2].Type = "string"
1821
SSLRequestDoc.Fields[2].Note = ""
1822
SSLRequestDoc.Fields[2].Description = "Minimum tls version - auto if not specified."
1823
SSLRequestDoc.Fields[2].Comments[encoder.LineComment] = "Minimum tls version - auto if not specified."
1824
SSLRequestDoc.Fields[2].Values = []string{
1825
"sslv3",
1826
"tls10",
1827
"tls11",
1828
"tls12",
1829
"tls13",
1830
}
1831
SSLRequestDoc.Fields[3].Name = "max_version"
1832
SSLRequestDoc.Fields[3].Type = "string"
1833
SSLRequestDoc.Fields[3].Note = ""
1834
SSLRequestDoc.Fields[3].Description = "Max tls version - auto if not specified."
1835
SSLRequestDoc.Fields[3].Comments[encoder.LineComment] = "Max tls version - auto if not specified."
1836
SSLRequestDoc.Fields[3].Values = []string{
1837
"sslv3",
1838
"tls10",
1839
"tls11",
1840
"tls12",
1841
"tls13",
1842
}
1843
SSLRequestDoc.Fields[4].Name = "cipher_suites"
1844
SSLRequestDoc.Fields[4].Type = "[]string"
1845
SSLRequestDoc.Fields[4].Note = ""
1846
SSLRequestDoc.Fields[4].Description = "Client Cipher Suites - auto if not specified."
1847
SSLRequestDoc.Fields[4].Comments[encoder.LineComment] = "Client Cipher Suites - auto if not specified."
1848
SSLRequestDoc.Fields[5].Name = "scan_mode"
1849
SSLRequestDoc.Fields[5].Type = "string"
1850
SSLRequestDoc.Fields[5].Note = ""
1851
SSLRequestDoc.Fields[5].Description = "description: |\n Tls Scan Mode - auto if not specified\n values:\n - \"ctls\"\n - \"ztls\"\n - \"auto\"\n - \"openssl\" # reverts to \"auto\" is openssl is not installed"
1852
SSLRequestDoc.Fields[5].Comments[encoder.LineComment] = " description: |"
1853
SSLRequestDoc.Fields[6].Name = "tls_version_enum"
1854
SSLRequestDoc.Fields[6].Type = "bool"
1855
SSLRequestDoc.Fields[6].Note = ""
1856
SSLRequestDoc.Fields[6].Description = "TLS Versions Enum - false if not specified\nEnumerates supported TLS versions"
1857
SSLRequestDoc.Fields[6].Comments[encoder.LineComment] = "TLS Versions Enum - false if not specified"
1858
SSLRequestDoc.Fields[7].Name = "tls_cipher_enum"
1859
SSLRequestDoc.Fields[7].Type = "bool"
1860
SSLRequestDoc.Fields[7].Note = ""
1861
SSLRequestDoc.Fields[7].Description = "TLS Ciphers Enum - false if not specified\nEnumerates supported TLS ciphers"
1862
SSLRequestDoc.Fields[7].Comments[encoder.LineComment] = "TLS Ciphers Enum - false if not specified"
1863
SSLRequestDoc.Fields[8].Name = "tls_cipher_types"
1864
SSLRequestDoc.Fields[8].Type = "[]string"
1865
SSLRequestDoc.Fields[8].Note = ""
1866
SSLRequestDoc.Fields[8].Description = "description: |\n TLS Cipher types to enumerate\n values:\n - \"insecure\" (default)\n - \"weak\"\n - \"secure\"\n - \"all\""
1867
SSLRequestDoc.Fields[8].Comments[encoder.LineComment] = " description: |"
1868
1869
WEBSOCKETRequestDoc.Type = "websocket.Request"
1870
WEBSOCKETRequestDoc.Comments[encoder.LineComment] = " Request is a request for the Websocket protocol"
1871
WEBSOCKETRequestDoc.Description = "Request is a request for the Websocket protocol"
1872
WEBSOCKETRequestDoc.AppearsIn = []encoder.Appearance{
1873
{
1874
TypeName: "Template",
1875
FieldName: "websocket",
1876
},
1877
}
1878
WEBSOCKETRequestDoc.PartDefinitions = []encoder.KeyValue{
1879
{
1880
Key: "type",
1881
Value: "Type is the type of request made",
1882
},
1883
{
1884
Key: "success",
1885
Value: "Success specifies whether websocket connection was successful",
1886
},
1887
{
1888
Key: "request",
1889
Value: "Websocket request made to the server",
1890
},
1891
{
1892
Key: "response",
1893
Value: "Websocket response received from the server",
1894
},
1895
{
1896
Key: "host",
1897
Value: "Host is the input to the template",
1898
},
1899
{
1900
Key: "matched",
1901
Value: "Matched is the input which was matched upon",
1902
},
1903
}
1904
WEBSOCKETRequestDoc.Fields = make([]encoder.Doc, 6)
1905
WEBSOCKETRequestDoc.Fields[0].Name = "id"
1906
WEBSOCKETRequestDoc.Fields[0].Type = "string"
1907
WEBSOCKETRequestDoc.Fields[0].Note = ""
1908
WEBSOCKETRequestDoc.Fields[0].Description = "ID is the optional id of the request"
1909
WEBSOCKETRequestDoc.Fields[0].Comments[encoder.LineComment] = " ID is the optional id of the request"
1910
WEBSOCKETRequestDoc.Fields[1].Name = "address"
1911
WEBSOCKETRequestDoc.Fields[1].Type = "string"
1912
WEBSOCKETRequestDoc.Fields[1].Note = ""
1913
WEBSOCKETRequestDoc.Fields[1].Description = "Address contains address for the request"
1914
WEBSOCKETRequestDoc.Fields[1].Comments[encoder.LineComment] = "Address contains address for the request"
1915
WEBSOCKETRequestDoc.Fields[2].Name = "inputs"
1916
WEBSOCKETRequestDoc.Fields[2].Type = "[]websocket.Input"
1917
WEBSOCKETRequestDoc.Fields[2].Note = ""
1918
WEBSOCKETRequestDoc.Fields[2].Description = "Inputs contains inputs for the websocket protocol"
1919
WEBSOCKETRequestDoc.Fields[2].Comments[encoder.LineComment] = "Inputs contains inputs for the websocket protocol"
1920
WEBSOCKETRequestDoc.Fields[3].Name = "headers"
1921
WEBSOCKETRequestDoc.Fields[3].Type = "map[string]string"
1922
WEBSOCKETRequestDoc.Fields[3].Note = ""
1923
WEBSOCKETRequestDoc.Fields[3].Description = "Headers contains headers for the request."
1924
WEBSOCKETRequestDoc.Fields[3].Comments[encoder.LineComment] = "Headers contains headers for the request."
1925
WEBSOCKETRequestDoc.Fields[4].Name = "attack"
1926
WEBSOCKETRequestDoc.Fields[4].Type = "generators.AttackTypeHolder"
1927
WEBSOCKETRequestDoc.Fields[4].Note = ""
1928
WEBSOCKETRequestDoc.Fields[4].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."
1929
WEBSOCKETRequestDoc.Fields[4].Comments[encoder.LineComment] = "Attack is the type of payload combinations to perform."
1930
WEBSOCKETRequestDoc.Fields[5].Name = "payloads"
1931
WEBSOCKETRequestDoc.Fields[5].Type = "map[string]interface{}"
1932
WEBSOCKETRequestDoc.Fields[5].Note = ""
1933
WEBSOCKETRequestDoc.Fields[5].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."
1934
WEBSOCKETRequestDoc.Fields[5].Comments[encoder.LineComment] = "Payloads contains any payloads for the current request."
1935
1936
WEBSOCKETInputDoc.Type = "websocket.Input"
1937
WEBSOCKETInputDoc.Comments[encoder.LineComment] = ""
1938
WEBSOCKETInputDoc.Description = ""
1939
WEBSOCKETInputDoc.AppearsIn = []encoder.Appearance{
1940
{
1941
TypeName: "websocket.Request",
1942
FieldName: "inputs",
1943
},
1944
}
1945
WEBSOCKETInputDoc.Fields = make([]encoder.Doc, 2)
1946
WEBSOCKETInputDoc.Fields[0].Name = "data"
1947
WEBSOCKETInputDoc.Fields[0].Type = "string"
1948
WEBSOCKETInputDoc.Fields[0].Note = ""
1949
WEBSOCKETInputDoc.Fields[0].Description = "Data is the data to send as the input.\n\nIt supports DSL Helper Functions as well as normal expressions."
1950
WEBSOCKETInputDoc.Fields[0].Comments[encoder.LineComment] = "Data is the data to send as the input."
1951
1952
WEBSOCKETInputDoc.Fields[0].AddExample("", "TEST")
1953
1954
WEBSOCKETInputDoc.Fields[0].AddExample("", "hex_decode('50494e47')")
1955
WEBSOCKETInputDoc.Fields[1].Name = "name"
1956
WEBSOCKETInputDoc.Fields[1].Type = "string"
1957
WEBSOCKETInputDoc.Fields[1].Note = ""
1958
WEBSOCKETInputDoc.Fields[1].Description = "Name is the optional name of the data read to provide matching on."
1959
WEBSOCKETInputDoc.Fields[1].Comments[encoder.LineComment] = "Name is the optional name of the data read to provide matching on."
1960
1961
WEBSOCKETInputDoc.Fields[1].AddExample("", "prefix")
1962
1963
WHOISRequestDoc.Type = "whois.Request"
1964
WHOISRequestDoc.Comments[encoder.LineComment] = " Request is a request for the WHOIS protocol"
1965
WHOISRequestDoc.Description = "Request is a request for the WHOIS protocol"
1966
WHOISRequestDoc.AppearsIn = []encoder.Appearance{
1967
{
1968
TypeName: "Template",
1969
FieldName: "whois",
1970
},
1971
}
1972
WHOISRequestDoc.Fields = make([]encoder.Doc, 3)
1973
WHOISRequestDoc.Fields[0].Name = "id"
1974
WHOISRequestDoc.Fields[0].Type = "string"
1975
WHOISRequestDoc.Fields[0].Note = ""
1976
WHOISRequestDoc.Fields[0].Description = "ID is the optional id of the request"
1977
WHOISRequestDoc.Fields[0].Comments[encoder.LineComment] = " ID is the optional id of the request"
1978
WHOISRequestDoc.Fields[1].Name = "query"
1979
WHOISRequestDoc.Fields[1].Type = "string"
1980
WHOISRequestDoc.Fields[1].Note = ""
1981
WHOISRequestDoc.Fields[1].Description = "Query contains query for the request"
1982
WHOISRequestDoc.Fields[1].Comments[encoder.LineComment] = "Query contains query for the request"
1983
WHOISRequestDoc.Fields[2].Name = "server"
1984
WHOISRequestDoc.Fields[2].Type = "string"
1985
WHOISRequestDoc.Fields[2].Note = ""
1986
WHOISRequestDoc.Fields[2].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"
1987
WHOISRequestDoc.Fields[2].Comments[encoder.LineComment] = " description: |"
1988
1989
CODERequestDoc.Type = "code.Request"
1990
CODERequestDoc.Comments[encoder.LineComment] = " Request is a request for the SSL protocol"
1991
CODERequestDoc.Description = "Request is a request for the SSL protocol"
1992
CODERequestDoc.AppearsIn = []encoder.Appearance{
1993
{
1994
TypeName: "Template",
1995
FieldName: "code",
1996
},
1997
}
1998
CODERequestDoc.PartDefinitions = []encoder.KeyValue{
1999
{
2000
Key: "type",
2001
Value: "Type is the type of request made",
2002
},
2003
{
2004
Key: "host",
2005
Value: "Host is the input to the template",
2006
},
2007
{
2008
Key: "matched",
2009
Value: "Matched is the input which was matched upon",
2010
},
2011
}
2012
CODERequestDoc.Fields = make([]encoder.Doc, 6)
2013
CODERequestDoc.Fields[0].Name = "id"
2014
CODERequestDoc.Fields[0].Type = "string"
2015
CODERequestDoc.Fields[0].Note = ""
2016
CODERequestDoc.Fields[0].Description = "ID is the optional id of the request"
2017
CODERequestDoc.Fields[0].Comments[encoder.LineComment] = " ID is the optional id of the request"
2018
CODERequestDoc.Fields[1].Name = "engine"
2019
CODERequestDoc.Fields[1].Type = "[]string"
2020
CODERequestDoc.Fields[1].Note = ""
2021
CODERequestDoc.Fields[1].Description = "Engine type"
2022
CODERequestDoc.Fields[1].Comments[encoder.LineComment] = "Engine type"
2023
CODERequestDoc.Fields[2].Name = "pre-condition"
2024
CODERequestDoc.Fields[2].Type = "string"
2025
CODERequestDoc.Fields[2].Note = ""
2026
CODERequestDoc.Fields[2].Description = "PreCondition is a condition which is evaluated before sending the request."
2027
CODERequestDoc.Fields[2].Comments[encoder.LineComment] = "PreCondition is a condition which is evaluated before sending the request."
2028
CODERequestDoc.Fields[3].Name = "args"
2029
CODERequestDoc.Fields[3].Type = "[]string"
2030
CODERequestDoc.Fields[3].Note = ""
2031
CODERequestDoc.Fields[3].Description = "Engine Arguments"
2032
CODERequestDoc.Fields[3].Comments[encoder.LineComment] = "Engine Arguments"
2033
CODERequestDoc.Fields[4].Name = "pattern"
2034
CODERequestDoc.Fields[4].Type = "string"
2035
CODERequestDoc.Fields[4].Note = ""
2036
CODERequestDoc.Fields[4].Description = "Pattern preferred for file name"
2037
CODERequestDoc.Fields[4].Comments[encoder.LineComment] = "Pattern preferred for file name"
2038
CODERequestDoc.Fields[5].Name = "source"
2039
CODERequestDoc.Fields[5].Type = "string"
2040
CODERequestDoc.Fields[5].Note = ""
2041
CODERequestDoc.Fields[5].Description = "Source File/Snippet"
2042
CODERequestDoc.Fields[5].Comments[encoder.LineComment] = "Source File/Snippet"
2043
2044
JAVASCRIPTRequestDoc.Type = "javascript.Request"
2045
JAVASCRIPTRequestDoc.Comments[encoder.LineComment] = " Request is a request for the javascript protocol"
2046
JAVASCRIPTRequestDoc.Description = "Request is a request for the javascript protocol"
2047
JAVASCRIPTRequestDoc.AppearsIn = []encoder.Appearance{
2048
{
2049
TypeName: "Template",
2050
FieldName: "javascript",
2051
},
2052
}
2053
JAVASCRIPTRequestDoc.PartDefinitions = []encoder.KeyValue{
2054
{
2055
Key: "type",
2056
Value: "Type is the type of request made",
2057
},
2058
{
2059
Key: "response",
2060
Value: "Javascript protocol result response",
2061
},
2062
{
2063
Key: "host",
2064
Value: "Host is the input to the template",
2065
},
2066
{
2067
Key: "matched",
2068
Value: "Matched is the input which was matched upon",
2069
},
2070
}
2071
JAVASCRIPTRequestDoc.Fields = make([]encoder.Doc, 9)
2072
JAVASCRIPTRequestDoc.Fields[0].Name = "id"
2073
JAVASCRIPTRequestDoc.Fields[0].Type = "string"
2074
JAVASCRIPTRequestDoc.Fields[0].Note = ""
2075
JAVASCRIPTRequestDoc.Fields[0].Description = "description: |\n ID is request id in that protocol"
2076
JAVASCRIPTRequestDoc.Fields[0].Comments[encoder.LineComment] = " description: |"
2077
JAVASCRIPTRequestDoc.Fields[1].Name = "init"
2078
JAVASCRIPTRequestDoc.Fields[1].Type = "string"
2079
JAVASCRIPTRequestDoc.Fields[1].Note = ""
2080
JAVASCRIPTRequestDoc.Fields[1].Description = "Init is javascript code to execute after compiling template and before executing it on any target\nThis is helpful for preparing payloads or other setup that maybe required for exploits"
2081
JAVASCRIPTRequestDoc.Fields[1].Comments[encoder.LineComment] = "Init is javascript code to execute after compiling template and before executing it on any target"
2082
JAVASCRIPTRequestDoc.Fields[2].Name = "pre-condition"
2083
JAVASCRIPTRequestDoc.Fields[2].Type = "string"
2084
JAVASCRIPTRequestDoc.Fields[2].Note = ""
2085
JAVASCRIPTRequestDoc.Fields[2].Description = "PreCondition is a condition which is evaluated before sending the request."
2086
JAVASCRIPTRequestDoc.Fields[2].Comments[encoder.LineComment] = "PreCondition is a condition which is evaluated before sending the request."
2087
JAVASCRIPTRequestDoc.Fields[3].Name = "args"
2088
JAVASCRIPTRequestDoc.Fields[3].Type = "map[string]interface{}"
2089
JAVASCRIPTRequestDoc.Fields[3].Note = ""
2090
JAVASCRIPTRequestDoc.Fields[3].Description = "Args contains the arguments to pass to the javascript code."
2091
JAVASCRIPTRequestDoc.Fields[3].Comments[encoder.LineComment] = "Args contains the arguments to pass to the javascript code."
2092
JAVASCRIPTRequestDoc.Fields[4].Name = "code"
2093
JAVASCRIPTRequestDoc.Fields[4].Type = "string"
2094
JAVASCRIPTRequestDoc.Fields[4].Note = ""
2095
JAVASCRIPTRequestDoc.Fields[4].Description = "Code contains code to execute for the javascript request."
2096
JAVASCRIPTRequestDoc.Fields[4].Comments[encoder.LineComment] = "Code contains code to execute for the javascript request."
2097
JAVASCRIPTRequestDoc.Fields[5].Name = "stop-at-first-match"
2098
JAVASCRIPTRequestDoc.Fields[5].Type = "bool"
2099
JAVASCRIPTRequestDoc.Fields[5].Note = ""
2100
JAVASCRIPTRequestDoc.Fields[5].Description = "StopAtFirstMatch stops processing the request at first match."
2101
JAVASCRIPTRequestDoc.Fields[5].Comments[encoder.LineComment] = "StopAtFirstMatch stops processing the request at first match."
2102
JAVASCRIPTRequestDoc.Fields[6].Name = "attack"
2103
JAVASCRIPTRequestDoc.Fields[6].Type = "generators.AttackTypeHolder"
2104
JAVASCRIPTRequestDoc.Fields[6].Note = ""
2105
JAVASCRIPTRequestDoc.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."
2106
JAVASCRIPTRequestDoc.Fields[6].Comments[encoder.LineComment] = "Attack is the type of payload combinations to perform."
2107
JAVASCRIPTRequestDoc.Fields[7].Name = "threads"
2108
JAVASCRIPTRequestDoc.Fields[7].Type = "int"
2109
JAVASCRIPTRequestDoc.Fields[7].Note = ""
2110
JAVASCRIPTRequestDoc.Fields[7].Description = "Payload concurreny i.e threads for sending requests."
2111
JAVASCRIPTRequestDoc.Fields[7].Comments[encoder.LineComment] = "Payload concurreny i.e threads for sending requests."
2112
2113
JAVASCRIPTRequestDoc.Fields[7].AddExample("Send requests using 10 concurrent threads", 10)
2114
JAVASCRIPTRequestDoc.Fields[8].Name = "payloads"
2115
JAVASCRIPTRequestDoc.Fields[8].Type = "map[string]interface{}"
2116
JAVASCRIPTRequestDoc.Fields[8].Note = ""
2117
JAVASCRIPTRequestDoc.Fields[8].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."
2118
JAVASCRIPTRequestDoc.Fields[8].Comments[encoder.LineComment] = "Payloads contains any payloads for the current request."
2119
2120
HTTPSignatureTypeHolderDoc.Type = "http.SignatureTypeHolder"
2121
HTTPSignatureTypeHolderDoc.Comments[encoder.LineComment] = " SignatureTypeHolder is used to hold internal type of the signature"
2122
HTTPSignatureTypeHolderDoc.Description = "SignatureTypeHolder is used to hold internal type of the signature"
2123
HTTPSignatureTypeHolderDoc.AppearsIn = []encoder.Appearance{
2124
{
2125
TypeName: "Template",
2126
FieldName: "signature",
2127
},
2128
}
2129
HTTPSignatureTypeHolderDoc.Fields = make([]encoder.Doc, 0)
2130
2131
VARIABLESVariableDoc.Type = "variables.Variable"
2132
VARIABLESVariableDoc.Comments[encoder.LineComment] = " Variable is a key-value pair of strings that can be used"
2133
VARIABLESVariableDoc.Description = "Variable is a key-value pair of strings that can be used\n throughout template."
2134
VARIABLESVariableDoc.AppearsIn = []encoder.Appearance{
2135
{
2136
TypeName: "Template",
2137
FieldName: "variables",
2138
},
2139
}
2140
VARIABLESVariableDoc.Fields = make([]encoder.Doc, 0)
2141
}
2142
2143
// GetTemplateDoc returns documentation for the file templates_doc.go.
2144
func GetTemplateDoc() *encoder.FileDoc {
2145
return &encoder.FileDoc{
2146
Name: "Template",
2147
Description: "",
2148
Structs: []*encoder.Doc{
2149
&TemplateDoc,
2150
&MODELInfoDoc,
2151
&STRINGSLICEStringSliceDoc,
2152
&STRINGSLICERawStringSliceDoc,
2153
&SEVERITYHolderDoc,
2154
&MODELClassificationDoc,
2155
&HTTPRequestDoc,
2156
&GENERATORSAttackTypeHolderDoc,
2157
&HTTPMethodTypeHolderDoc,
2158
&FUZZRuleDoc,
2159
&SliceOrMapSliceDoc,
2160
&ANALYZERSAnalyzerTemplateDoc,
2161
&SignatureTypeHolderDoc,
2162
&MATCHERSMatcherDoc,
2163
&MatcherTypeHolderDoc,
2164
&DNSRequestDoc,
2165
&DNSRequestTypeHolderDoc,
2166
&FILERequestDoc,
2167
&NETWORKRequestDoc,
2168
&NETWORKInputDoc,
2169
&NetworkInputTypeHolderDoc,
2170
&HEADLESSRequestDoc,
2171
&ENGINEActionDoc,
2172
&ActionTypeHolderDoc,
2173
&USERAGENTUserAgentHolderDoc,
2174
&SSLRequestDoc,
2175
&WEBSOCKETRequestDoc,
2176
&WEBSOCKETInputDoc,
2177
&WHOISRequestDoc,
2178
&CODERequestDoc,
2179
&JAVASCRIPTRequestDoc,
2180
&HTTPSignatureTypeHolderDoc,
2181
&VARIABLESVariableDoc,
2182
},
2183
}
2184
}
2185
2186