forked from projectdiscovery/nuclei
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplates_doc.go
2025 lines (1909 loc) · 103 KB
/
templates_doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
// DO NOT EDIT: this file is automatically generated by docgen
package templates
import (
"github.com/projectdiscovery/yamldoc-go/encoder"
)
var (
TemplateDoc encoder.Doc
MODELInfoDoc encoder.Doc
STRINGSLICEStringSliceDoc encoder.Doc
STRINGSLICERawStringSliceDoc encoder.Doc
SEVERITYHolderDoc encoder.Doc
MODELClassificationDoc encoder.Doc
HTTPRequestDoc encoder.Doc
GENERATORSAttackTypeHolderDoc encoder.Doc
HTTPMethodTypeHolderDoc encoder.Doc
FUZZRuleDoc encoder.Doc
SliceOrMapSliceDoc encoder.Doc
SignatureTypeHolderDoc encoder.Doc
MATCHERSMatcherDoc encoder.Doc
MatcherTypeHolderDoc encoder.Doc
DNSRequestDoc encoder.Doc
DNSRequestTypeHolderDoc encoder.Doc
FILERequestDoc encoder.Doc
NETWORKRequestDoc encoder.Doc
NETWORKInputDoc encoder.Doc
NetworkInputTypeHolderDoc encoder.Doc
HEADLESSRequestDoc encoder.Doc
ENGINEActionDoc encoder.Doc
ActionTypeHolderDoc encoder.Doc
USERAGENTUserAgentHolderDoc encoder.Doc
SSLRequestDoc encoder.Doc
WEBSOCKETRequestDoc encoder.Doc
WEBSOCKETInputDoc encoder.Doc
WHOISRequestDoc encoder.Doc
CODERequestDoc encoder.Doc
JAVASCRIPTRequestDoc encoder.Doc
HTTPSignatureTypeHolderDoc encoder.Doc
VARIABLESVariableDoc encoder.Doc
)
func init() {
TemplateDoc.Type = "Template"
TemplateDoc.Comments[encoder.LineComment] = " Template is a YAML input file which defines all the requests and"
TemplateDoc.Description = "Template is a YAML input file which defines all the requests and\n other metadata for a template."
TemplateDoc.Fields = make([]encoder.Doc, 20)
TemplateDoc.Fields[0].Name = "id"
TemplateDoc.Fields[0].Type = "string"
TemplateDoc.Fields[0].Note = ""
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`."
TemplateDoc.Fields[0].Comments[encoder.LineComment] = "ID is the unique id for the template."
TemplateDoc.Fields[0].AddExample("ID Example", "CVE-2021-19520")
TemplateDoc.Fields[1].Name = "info"
TemplateDoc.Fields[1].Type = "model.Info"
TemplateDoc.Fields[1].Note = ""
TemplateDoc.Fields[1].Description = "Info contains metadata information about the template."
TemplateDoc.Fields[1].Comments[encoder.LineComment] = "Info contains metadata information about the template."
TemplateDoc.Fields[1].AddExample("", exampleInfoStructure)
TemplateDoc.Fields[2].Name = "flow"
TemplateDoc.Fields[2].Type = "string"
TemplateDoc.Fields[2].Note = ""
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"
TemplateDoc.Fields[2].Comments[encoder.LineComment] = " description: |"
TemplateDoc.Fields[3].Name = "requests"
TemplateDoc.Fields[3].Type = "[]http.Request"
TemplateDoc.Fields[3].Note = ""
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."
TemplateDoc.Fields[3].Comments[encoder.LineComment] = "Requests contains the http request to make in the template."
TemplateDoc.Fields[3].AddExample("", exampleNormalHTTPRequest)
TemplateDoc.Fields[4].Name = "http"
TemplateDoc.Fields[4].Type = "[]http.Request"
TemplateDoc.Fields[4].Note = ""
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."
TemplateDoc.Fields[4].Comments[encoder.LineComment] = " description: |"
TemplateDoc.Fields[5].Name = "dns"
TemplateDoc.Fields[5].Type = "[]dns.Request"
TemplateDoc.Fields[5].Note = ""
TemplateDoc.Fields[5].Description = "DNS contains the dns request to make in the template"
TemplateDoc.Fields[5].Comments[encoder.LineComment] = "DNS contains the dns request to make in the template"
TemplateDoc.Fields[5].AddExample("", exampleNormalDNSRequest)
TemplateDoc.Fields[6].Name = "file"
TemplateDoc.Fields[6].Type = "[]file.Request"
TemplateDoc.Fields[6].Note = ""
TemplateDoc.Fields[6].Description = "File contains the file request to make in the template"
TemplateDoc.Fields[6].Comments[encoder.LineComment] = "File contains the file request to make in the template"
TemplateDoc.Fields[6].AddExample("", exampleNormalFileRequest)
TemplateDoc.Fields[7].Name = "network"
TemplateDoc.Fields[7].Type = "[]network.Request"
TemplateDoc.Fields[7].Note = ""
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."
TemplateDoc.Fields[7].Comments[encoder.LineComment] = "Network contains the network request to make in the template"
TemplateDoc.Fields[7].AddExample("", exampleNormalNetworkRequest)
TemplateDoc.Fields[8].Name = "tcp"
TemplateDoc.Fields[8].Type = "[]network.Request"
TemplateDoc.Fields[8].Note = ""
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."
TemplateDoc.Fields[8].Comments[encoder.LineComment] = " description: |"
TemplateDoc.Fields[9].Name = "headless"
TemplateDoc.Fields[9].Type = "[]headless.Request"
TemplateDoc.Fields[9].Note = ""
TemplateDoc.Fields[9].Description = "Headless contains the headless request to make in the template."
TemplateDoc.Fields[9].Comments[encoder.LineComment] = "Headless contains the headless request to make in the template."
TemplateDoc.Fields[10].Name = "ssl"
TemplateDoc.Fields[10].Type = "[]ssl.Request"
TemplateDoc.Fields[10].Note = ""
TemplateDoc.Fields[10].Description = "SSL contains the SSL request to make in the template."
TemplateDoc.Fields[10].Comments[encoder.LineComment] = "SSL contains the SSL request to make in the template."
TemplateDoc.Fields[11].Name = "websocket"
TemplateDoc.Fields[11].Type = "[]websocket.Request"
TemplateDoc.Fields[11].Note = ""
TemplateDoc.Fields[11].Description = "Websocket contains the Websocket request to make in the template."
TemplateDoc.Fields[11].Comments[encoder.LineComment] = "Websocket contains the Websocket request to make in the template."
TemplateDoc.Fields[12].Name = "whois"
TemplateDoc.Fields[12].Type = "[]whois.Request"
TemplateDoc.Fields[12].Note = ""
TemplateDoc.Fields[12].Description = "WHOIS contains the WHOIS request to make in the template."
TemplateDoc.Fields[12].Comments[encoder.LineComment] = "WHOIS contains the WHOIS request to make in the template."
TemplateDoc.Fields[13].Name = "code"
TemplateDoc.Fields[13].Type = "[]code.Request"
TemplateDoc.Fields[13].Note = ""
TemplateDoc.Fields[13].Description = "Code contains code snippets."
TemplateDoc.Fields[13].Comments[encoder.LineComment] = "Code contains code snippets."
TemplateDoc.Fields[14].Name = "javascript"
TemplateDoc.Fields[14].Type = "[]javascript.Request"
TemplateDoc.Fields[14].Note = ""
TemplateDoc.Fields[14].Description = "Javascript contains the javascript request to make in the template."
TemplateDoc.Fields[14].Comments[encoder.LineComment] = "Javascript contains the javascript request to make in the template."
TemplateDoc.Fields[15].Name = "self-contained"
TemplateDoc.Fields[15].Type = "bool"
TemplateDoc.Fields[15].Note = ""
TemplateDoc.Fields[15].Description = "Self Contained marks Requests for the template as self-contained"
TemplateDoc.Fields[15].Comments[encoder.LineComment] = "Self Contained marks Requests for the template as self-contained"
TemplateDoc.Fields[16].Name = "stop-at-first-match"
TemplateDoc.Fields[16].Type = "bool"
TemplateDoc.Fields[16].Note = ""
TemplateDoc.Fields[16].Description = "Stop execution once first match is found"
TemplateDoc.Fields[16].Comments[encoder.LineComment] = "Stop execution once first match is found"
TemplateDoc.Fields[17].Name = "signature"
TemplateDoc.Fields[17].Type = "http.SignatureTypeHolder"
TemplateDoc.Fields[17].Note = ""
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"
TemplateDoc.Fields[17].Comments[encoder.LineComment] = "Signature is the request signature method"
TemplateDoc.Fields[17].Values = []string{
"AWS",
}
TemplateDoc.Fields[18].Name = "variables"
TemplateDoc.Fields[18].Type = "variables.Variable"
TemplateDoc.Fields[18].Note = ""
TemplateDoc.Fields[18].Description = "Variables contains any variables for the current request."
TemplateDoc.Fields[18].Comments[encoder.LineComment] = "Variables contains any variables for the current request."
TemplateDoc.Fields[19].Name = "constants"
TemplateDoc.Fields[19].Type = "map[string]interface{}"
TemplateDoc.Fields[19].Note = ""
TemplateDoc.Fields[19].Description = "Constants contains any scalar constant for the current template"
TemplateDoc.Fields[19].Comments[encoder.LineComment] = "Constants contains any scalar constant for the current template"
MODELInfoDoc.Type = "model.Info"
MODELInfoDoc.Comments[encoder.LineComment] = " Info contains metadata information about a template"
MODELInfoDoc.Description = "Info contains metadata information about a template"
MODELInfoDoc.AddExample("", exampleInfoStructure)
MODELInfoDoc.AppearsIn = []encoder.Appearance{
{
TypeName: "Template",
FieldName: "info",
},
}
MODELInfoDoc.Fields = make([]encoder.Doc, 10)
MODELInfoDoc.Fields[0].Name = "name"
MODELInfoDoc.Fields[0].Type = "string"
MODELInfoDoc.Fields[0].Note = ""
MODELInfoDoc.Fields[0].Description = "Name should be good short summary that identifies what the template does."
MODELInfoDoc.Fields[0].Comments[encoder.LineComment] = "Name should be good short summary that identifies what the template does."
MODELInfoDoc.Fields[0].AddExample("", "bower.json file disclosure")
MODELInfoDoc.Fields[0].AddExample("", "Nagios Default Credentials Check")
MODELInfoDoc.Fields[1].Name = "author"
MODELInfoDoc.Fields[1].Type = "stringslice.StringSlice"
MODELInfoDoc.Fields[1].Note = ""
MODELInfoDoc.Fields[1].Description = "Author of the template.\n\nMultiple values can also be specified separated by commas."
MODELInfoDoc.Fields[1].Comments[encoder.LineComment] = "Author of the template."
MODELInfoDoc.Fields[1].AddExample("", "<username>")
MODELInfoDoc.Fields[2].Name = "tags"
MODELInfoDoc.Fields[2].Type = "stringslice.StringSlice"
MODELInfoDoc.Fields[2].Note = ""
MODELInfoDoc.Fields[2].Description = "Any tags for the template.\n\nMultiple values can also be specified separated by commas."
MODELInfoDoc.Fields[2].Comments[encoder.LineComment] = "Any tags for the template."
MODELInfoDoc.Fields[2].AddExample("Example tags", "cve,cve2019,grafana,auth-bypass,dos")
MODELInfoDoc.Fields[3].Name = "description"
MODELInfoDoc.Fields[3].Type = "string"
MODELInfoDoc.Fields[3].Note = ""
MODELInfoDoc.Fields[3].Description = "Description of the template.\n\nYou can go in-depth here on what the template actually does."
MODELInfoDoc.Fields[3].Comments[encoder.LineComment] = "Description of the template."
MODELInfoDoc.Fields[3].AddExample("", "Bower is a package manager which stores package information in the bower.json file")
MODELInfoDoc.Fields[3].AddExample("", "Subversion ALM for the enterprise before 8.8.2 allows reflected XSS at multiple locations")
MODELInfoDoc.Fields[4].Name = "impact"
MODELInfoDoc.Fields[4].Type = "string"
MODELInfoDoc.Fields[4].Note = ""
MODELInfoDoc.Fields[4].Description = "Impact of the template.\n\nYou can go in-depth here on impact of the template."
MODELInfoDoc.Fields[4].Comments[encoder.LineComment] = "Impact of the template."
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.")
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.")
MODELInfoDoc.Fields[5].Name = "reference"
MODELInfoDoc.Fields[5].Type = "stringslice.RawStringSlice"
MODELInfoDoc.Fields[5].Note = ""
MODELInfoDoc.Fields[5].Description = "References for the template.\n\nThis should contain links relevant to the template."
MODELInfoDoc.Fields[5].Comments[encoder.LineComment] = "References for the template."
MODELInfoDoc.Fields[5].AddExample("", []string{"https://github.com/strapi/strapi", "https://github.com/getgrav/grav"})
MODELInfoDoc.Fields[6].Name = "severity"
MODELInfoDoc.Fields[6].Type = "severity.Holder"
MODELInfoDoc.Fields[6].Note = ""
MODELInfoDoc.Fields[6].Description = "Severity of the template."
MODELInfoDoc.Fields[6].Comments[encoder.LineComment] = "Severity of the template."
MODELInfoDoc.Fields[7].Name = "metadata"
MODELInfoDoc.Fields[7].Type = "map[string]interface{}"
MODELInfoDoc.Fields[7].Note = ""
MODELInfoDoc.Fields[7].Description = "Metadata of the template."
MODELInfoDoc.Fields[7].Comments[encoder.LineComment] = "Metadata of the template."
MODELInfoDoc.Fields[7].AddExample("", map[string]string{"customField1": "customValue1"})
MODELInfoDoc.Fields[8].Name = "classification"
MODELInfoDoc.Fields[8].Type = "model.Classification"
MODELInfoDoc.Fields[8].Note = ""
MODELInfoDoc.Fields[8].Description = "Classification contains classification information about the template."
MODELInfoDoc.Fields[8].Comments[encoder.LineComment] = "Classification contains classification information about the template."
MODELInfoDoc.Fields[9].Name = "remediation"
MODELInfoDoc.Fields[9].Type = "string"
MODELInfoDoc.Fields[9].Note = ""
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."
MODELInfoDoc.Fields[9].Comments[encoder.LineComment] = "Remediation steps for the template."
MODELInfoDoc.Fields[9].AddExample("", "Change the default administrative username and password of Apache ActiveMQ by editing the file jetty-realm.properties")
STRINGSLICEStringSliceDoc.Type = "stringslice.StringSlice"
STRINGSLICEStringSliceDoc.Comments[encoder.LineComment] = " StringSlice represents a single (in-lined) or multiple string value(s)."
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."
STRINGSLICEStringSliceDoc.AddExample("", "<username>")
STRINGSLICEStringSliceDoc.AddExample("Example tags", "cve,cve2019,grafana,auth-bypass,dos")
STRINGSLICEStringSliceDoc.AddExample("", "CVE-2020-14420")
STRINGSLICEStringSliceDoc.AddExample("", "CWE-22")
STRINGSLICEStringSliceDoc.AppearsIn = []encoder.Appearance{
{
TypeName: "model.Info",
FieldName: "author",
},
{
TypeName: "model.Info",
FieldName: "tags",
},
{
TypeName: "model.Classification",
FieldName: "cve-id",
},
{
TypeName: "model.Classification",
FieldName: "cwe-id",
},
}
STRINGSLICEStringSliceDoc.Fields = make([]encoder.Doc, 0)
STRINGSLICERawStringSliceDoc.Type = "stringslice.RawStringSlice"
STRINGSLICERawStringSliceDoc.Comments[encoder.LineComment] = ""
STRINGSLICERawStringSliceDoc.Description = ""
STRINGSLICERawStringSliceDoc.AddExample("", []string{"https://github.com/strapi/strapi", "https://github.com/getgrav/grav"})
STRINGSLICERawStringSliceDoc.AppearsIn = []encoder.Appearance{
{
TypeName: "model.Info",
FieldName: "reference",
},
}
STRINGSLICERawStringSliceDoc.Fields = make([]encoder.Doc, 0)
SEVERITYHolderDoc.Type = "severity.Holder"
SEVERITYHolderDoc.Comments[encoder.LineComment] = " Holder holds a Severity type. Required for un/marshalling purposes"
SEVERITYHolderDoc.Description = "Holder holds a Severity type. Required for un/marshalling purposes"
SEVERITYHolderDoc.AppearsIn = []encoder.Appearance{
{
TypeName: "model.Info",
FieldName: "severity",
},
}
SEVERITYHolderDoc.Fields = make([]encoder.Doc, 1)
SEVERITYHolderDoc.Fields[0].Name = ""
SEVERITYHolderDoc.Fields[0].Type = "Severity"
SEVERITYHolderDoc.Fields[0].Note = ""
SEVERITYHolderDoc.Fields[0].Description = ""
SEVERITYHolderDoc.Fields[0].Comments[encoder.LineComment] = ""
SEVERITYHolderDoc.Fields[0].EnumFields = []string{
"undefined",
"info",
"low",
"medium",
"high",
"critical",
"unknown",
}
MODELClassificationDoc.Type = "model.Classification"
MODELClassificationDoc.Comments[encoder.LineComment] = ""
MODELClassificationDoc.Description = ""
MODELClassificationDoc.AppearsIn = []encoder.Appearance{
{
TypeName: "model.Info",
FieldName: "classification",
},
}
MODELClassificationDoc.Fields = make([]encoder.Doc, 7)
MODELClassificationDoc.Fields[0].Name = "cve-id"
MODELClassificationDoc.Fields[0].Type = "stringslice.StringSlice"
MODELClassificationDoc.Fields[0].Note = ""
MODELClassificationDoc.Fields[0].Description = "CVE ID for the template"
MODELClassificationDoc.Fields[0].Comments[encoder.LineComment] = "CVE ID for the template"
MODELClassificationDoc.Fields[0].AddExample("", "CVE-2020-14420")
MODELClassificationDoc.Fields[1].Name = "cwe-id"
MODELClassificationDoc.Fields[1].Type = "stringslice.StringSlice"
MODELClassificationDoc.Fields[1].Note = ""
MODELClassificationDoc.Fields[1].Description = "CWE ID for the template."
MODELClassificationDoc.Fields[1].Comments[encoder.LineComment] = "CWE ID for the template."
MODELClassificationDoc.Fields[1].AddExample("", "CWE-22")
MODELClassificationDoc.Fields[2].Name = "cvss-metrics"
MODELClassificationDoc.Fields[2].Type = "string"
MODELClassificationDoc.Fields[2].Note = ""
MODELClassificationDoc.Fields[2].Description = "CVSS Metrics for the template."
MODELClassificationDoc.Fields[2].Comments[encoder.LineComment] = "CVSS Metrics for the template."
MODELClassificationDoc.Fields[2].AddExample("", "3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H")
MODELClassificationDoc.Fields[3].Name = "cvss-score"
MODELClassificationDoc.Fields[3].Type = "float64"
MODELClassificationDoc.Fields[3].Note = ""
MODELClassificationDoc.Fields[3].Description = "CVSS Score for the template."
MODELClassificationDoc.Fields[3].Comments[encoder.LineComment] = "CVSS Score for the template."
MODELClassificationDoc.Fields[3].AddExample("", "9.8")
MODELClassificationDoc.Fields[4].Name = "epss-score"
MODELClassificationDoc.Fields[4].Type = "float64"
MODELClassificationDoc.Fields[4].Note = ""
MODELClassificationDoc.Fields[4].Description = "EPSS Score for the template."
MODELClassificationDoc.Fields[4].Comments[encoder.LineComment] = "EPSS Score for the template."
MODELClassificationDoc.Fields[4].AddExample("", "0.42509")
MODELClassificationDoc.Fields[5].Name = "epss-percentile"
MODELClassificationDoc.Fields[5].Type = "float64"
MODELClassificationDoc.Fields[5].Note = ""
MODELClassificationDoc.Fields[5].Description = "EPSS Percentile for the template."
MODELClassificationDoc.Fields[5].Comments[encoder.LineComment] = "EPSS Percentile for the template."
MODELClassificationDoc.Fields[5].AddExample("", "0.42509")
MODELClassificationDoc.Fields[6].Name = "cpe"
MODELClassificationDoc.Fields[6].Type = "string"
MODELClassificationDoc.Fields[6].Note = ""
MODELClassificationDoc.Fields[6].Description = "CPE for the template."
MODELClassificationDoc.Fields[6].Comments[encoder.LineComment] = "CPE for the template."
MODELClassificationDoc.Fields[6].AddExample("", "cpe:/a:vendor:product:version")
HTTPRequestDoc.Type = "http.Request"
HTTPRequestDoc.Comments[encoder.LineComment] = " Request contains a http request to be made from a template"
HTTPRequestDoc.Description = "Request contains a http request to be made from a template"
HTTPRequestDoc.AddExample("", exampleNormalHTTPRequest)
HTTPRequestDoc.AppearsIn = []encoder.Appearance{
{
TypeName: "Template",
FieldName: "requests",
},
{
TypeName: "Template",
FieldName: "http",
},
}
HTTPRequestDoc.PartDefinitions = []encoder.KeyValue{
{
Key: "template-id",
Value: "ID of the template executed",
},
{
Key: "template-info",
Value: "Info Block of the template executed",
},
{
Key: "template-path",
Value: "Path of the template executed",
},
{
Key: "host",
Value: "Host is the input to the template",
},
{
Key: "matched",
Value: "Matched is the input which was matched upon",
},
{
Key: "type",
Value: "Type is the type of request made",
},
{
Key: "request",
Value: "HTTP request made from the client",
},
{
Key: "response",
Value: "HTTP response received from server",
},
{
Key: "status_code",
Value: "Status Code received from the Server",
},
{
Key: "body",
Value: "HTTP response body received from server (default)",
},
{
Key: "content_length",
Value: "HTTP Response content length",
},
{
Key: "header,all_headers",
Value: "HTTP response headers",
},
{
Key: "duration",
Value: "HTTP request time duration",
},
{
Key: "all",
Value: "HTTP response body + headers",
},
{
Key: "cookies_from_response",
Value: "HTTP response cookies in name:value format",
},
{
Key: "headers_from_response",
Value: "HTTP response headers in name:value format",
},
}
HTTPRequestDoc.Fields = make([]encoder.Doc, 35)
HTTPRequestDoc.Fields[0].Name = "path"
HTTPRequestDoc.Fields[0].Type = "[]string"
HTTPRequestDoc.Fields[0].Note = ""
HTTPRequestDoc.Fields[0].Description = "Path contains the path/s for the HTTP requests. It supports variables\nas placeholders."
HTTPRequestDoc.Fields[0].Comments[encoder.LineComment] = "Path contains the path/s for the HTTP requests. It supports variables"
HTTPRequestDoc.Fields[0].AddExample("Some example path values", []string{"{{BaseURL}}", "{{BaseURL}}/+CSCOU+/../+CSCOE+/files/file_list.json?path=/sessions"})
HTTPRequestDoc.Fields[1].Name = "raw"
HTTPRequestDoc.Fields[1].Type = "[]string"
HTTPRequestDoc.Fields[1].Note = ""
HTTPRequestDoc.Fields[1].Description = "Raw contains HTTP Requests in Raw format."
HTTPRequestDoc.Fields[1].Comments[encoder.LineComment] = "Raw contains HTTP Requests in Raw format."
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"})
HTTPRequestDoc.Fields[2].Name = "id"
HTTPRequestDoc.Fields[2].Type = "string"
HTTPRequestDoc.Fields[2].Note = ""
HTTPRequestDoc.Fields[2].Description = "ID is the optional id of the request"
HTTPRequestDoc.Fields[2].Comments[encoder.LineComment] = " ID is the optional id of the request"
HTTPRequestDoc.Fields[3].Name = "name"
HTTPRequestDoc.Fields[3].Type = "string"
HTTPRequestDoc.Fields[3].Note = ""
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."
HTTPRequestDoc.Fields[3].Comments[encoder.LineComment] = "Name is the optional name of the request."
HTTPRequestDoc.Fields[4].Name = "attack"
HTTPRequestDoc.Fields[4].Type = "generators.AttackTypeHolder"
HTTPRequestDoc.Fields[4].Note = ""
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."
HTTPRequestDoc.Fields[4].Comments[encoder.LineComment] = "Attack is the type of payload combinations to perform."
HTTPRequestDoc.Fields[4].Values = []string{
"batteringram",
"pitchfork",
"clusterbomb",
}
HTTPRequestDoc.Fields[5].Name = "method"
HTTPRequestDoc.Fields[5].Type = "HTTPMethodTypeHolder"
HTTPRequestDoc.Fields[5].Note = ""
HTTPRequestDoc.Fields[5].Description = "Method is the HTTP Request Method."
HTTPRequestDoc.Fields[5].Comments[encoder.LineComment] = "Method is the HTTP Request Method."
HTTPRequestDoc.Fields[6].Name = "body"
HTTPRequestDoc.Fields[6].Type = "string"
HTTPRequestDoc.Fields[6].Note = ""
HTTPRequestDoc.Fields[6].Description = "Body is an optional parameter which contains HTTP Request body."
HTTPRequestDoc.Fields[6].Comments[encoder.LineComment] = "Body is an optional parameter which contains HTTP Request body."
HTTPRequestDoc.Fields[6].AddExample("Same Body for a Login POST request", "username=test&password=test")
HTTPRequestDoc.Fields[7].Name = "payloads"
HTTPRequestDoc.Fields[7].Type = "map[string]interface{}"
HTTPRequestDoc.Fields[7].Note = ""
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."
HTTPRequestDoc.Fields[7].Comments[encoder.LineComment] = "Payloads contains any payloads for the current request."
HTTPRequestDoc.Fields[8].Name = "headers"
HTTPRequestDoc.Fields[8].Type = "map[string]string"
HTTPRequestDoc.Fields[8].Note = ""
HTTPRequestDoc.Fields[8].Description = "Headers contains HTTP Headers to send with the request."
HTTPRequestDoc.Fields[8].Comments[encoder.LineComment] = "Headers contains HTTP Headers to send with the request."
HTTPRequestDoc.Fields[8].AddExample("", map[string]string{"Content-Type": "application/x-www-form-urlencoded", "Content-Length": "1", "Any-Header": "Any-Value"})
HTTPRequestDoc.Fields[9].Name = "race_count"
HTTPRequestDoc.Fields[9].Type = "int"
HTTPRequestDoc.Fields[9].Note = ""
HTTPRequestDoc.Fields[9].Description = "RaceCount is the number of times to send a request in Race Condition Attack."
HTTPRequestDoc.Fields[9].Comments[encoder.LineComment] = "RaceCount is the number of times to send a request in Race Condition Attack."
HTTPRequestDoc.Fields[9].AddExample("Send a request 5 times", 5)
HTTPRequestDoc.Fields[10].Name = "max-redirects"
HTTPRequestDoc.Fields[10].Type = "int"
HTTPRequestDoc.Fields[10].Note = ""
HTTPRequestDoc.Fields[10].Description = "MaxRedirects is the maximum number of redirects that should be followed."
HTTPRequestDoc.Fields[10].Comments[encoder.LineComment] = "MaxRedirects is the maximum number of redirects that should be followed."
HTTPRequestDoc.Fields[10].AddExample("Follow up to 5 redirects", 5)
HTTPRequestDoc.Fields[11].Name = "pipeline-concurrent-connections"
HTTPRequestDoc.Fields[11].Type = "int"
HTTPRequestDoc.Fields[11].Note = ""
HTTPRequestDoc.Fields[11].Description = "PipelineConcurrentConnections is number of connections to create during pipelining."
HTTPRequestDoc.Fields[11].Comments[encoder.LineComment] = "PipelineConcurrentConnections is number of connections to create during pipelining."
HTTPRequestDoc.Fields[11].AddExample("Create 40 concurrent connections", 40)
HTTPRequestDoc.Fields[12].Name = "pipeline-requests-per-connection"
HTTPRequestDoc.Fields[12].Type = "int"
HTTPRequestDoc.Fields[12].Note = ""
HTTPRequestDoc.Fields[12].Description = "PipelineRequestsPerConnection is number of requests to send per connection when pipelining."
HTTPRequestDoc.Fields[12].Comments[encoder.LineComment] = "PipelineRequestsPerConnection is number of requests to send per connection when pipelining."
HTTPRequestDoc.Fields[12].AddExample("Send 100 requests per pipeline connection", 100)
HTTPRequestDoc.Fields[13].Name = "threads"
HTTPRequestDoc.Fields[13].Type = "int"
HTTPRequestDoc.Fields[13].Note = ""
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."
HTTPRequestDoc.Fields[13].Comments[encoder.LineComment] = "Threads specifies number of threads to use sending requests. This enables Connection Pooling."
HTTPRequestDoc.Fields[13].AddExample("Send requests using 10 concurrent threads", 10)
HTTPRequestDoc.Fields[14].Name = "max-size"
HTTPRequestDoc.Fields[14].Type = "int"
HTTPRequestDoc.Fields[14].Note = ""
HTTPRequestDoc.Fields[14].Description = "MaxSize is the maximum size of http response body to read in bytes."
HTTPRequestDoc.Fields[14].Comments[encoder.LineComment] = "MaxSize is the maximum size of http response body to read in bytes."
HTTPRequestDoc.Fields[14].AddExample("Read max 2048 bytes of the response", 2048)
HTTPRequestDoc.Fields[15].Name = "fuzzing"
HTTPRequestDoc.Fields[15].Type = "[]fuzz.Rule"
HTTPRequestDoc.Fields[15].Note = ""
HTTPRequestDoc.Fields[15].Description = "Fuzzing describes schema to fuzz http requests"
HTTPRequestDoc.Fields[15].Comments[encoder.LineComment] = " Fuzzing describes schema to fuzz http requests"
HTTPRequestDoc.Fields[16].Name = "self-contained"
HTTPRequestDoc.Fields[16].Type = "bool"
HTTPRequestDoc.Fields[16].Note = ""
HTTPRequestDoc.Fields[16].Description = "SelfContained specifies if the request is self-contained."
HTTPRequestDoc.Fields[16].Comments[encoder.LineComment] = "SelfContained specifies if the request is self-contained."
HTTPRequestDoc.Fields[17].Name = "signature"
HTTPRequestDoc.Fields[17].Type = "SignatureTypeHolder"
HTTPRequestDoc.Fields[17].Note = ""
HTTPRequestDoc.Fields[17].Description = "Signature is the request signature method"
HTTPRequestDoc.Fields[17].Comments[encoder.LineComment] = "Signature is the request signature method"
HTTPRequestDoc.Fields[17].Values = []string{
"AWS",
}
HTTPRequestDoc.Fields[18].Name = "cookie-reuse"
HTTPRequestDoc.Fields[18].Type = "bool"
HTTPRequestDoc.Fields[18].Note = ""
HTTPRequestDoc.Fields[18].Description = "CookieReuse is an optional setting that enables cookie reuse for\nall requests defined in raw section."
HTTPRequestDoc.Fields[18].Comments[encoder.LineComment] = "CookieReuse is an optional setting that enables cookie reuse for"
HTTPRequestDoc.Fields[19].Name = "disable-cookie"
HTTPRequestDoc.Fields[19].Type = "bool"
HTTPRequestDoc.Fields[19].Note = ""
HTTPRequestDoc.Fields[19].Description = "DisableCookie is an optional setting that disables cookie reuse"
HTTPRequestDoc.Fields[19].Comments[encoder.LineComment] = "DisableCookie is an optional setting that disables cookie reuse"
HTTPRequestDoc.Fields[20].Name = "read-all"
HTTPRequestDoc.Fields[20].Type = "bool"
HTTPRequestDoc.Fields[20].Note = ""
HTTPRequestDoc.Fields[20].Description = "Enables force reading of the entire raw unsafe request body ignoring\nany specified content length headers."
HTTPRequestDoc.Fields[20].Comments[encoder.LineComment] = "Enables force reading of the entire raw unsafe request body ignoring"
HTTPRequestDoc.Fields[21].Name = "redirects"
HTTPRequestDoc.Fields[21].Type = "bool"
HTTPRequestDoc.Fields[21].Note = ""
HTTPRequestDoc.Fields[21].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."
HTTPRequestDoc.Fields[21].Comments[encoder.LineComment] = "Redirects specifies whether redirects should be followed by the HTTP Client."
HTTPRequestDoc.Fields[22].Name = "host-redirects"
HTTPRequestDoc.Fields[22].Type = "bool"
HTTPRequestDoc.Fields[22].Note = ""
HTTPRequestDoc.Fields[22].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."
HTTPRequestDoc.Fields[22].Comments[encoder.LineComment] = "Redirects specifies whether only redirects to the same host should be followed by the HTTP Client."
HTTPRequestDoc.Fields[23].Name = "pipeline"
HTTPRequestDoc.Fields[23].Type = "bool"
HTTPRequestDoc.Fields[23].Note = ""
HTTPRequestDoc.Fields[23].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."
HTTPRequestDoc.Fields[23].Comments[encoder.LineComment] = "Pipeline defines if the attack should be performed with HTTP 1.1 Pipelining"
HTTPRequestDoc.Fields[24].Name = "unsafe"
HTTPRequestDoc.Fields[24].Type = "bool"
HTTPRequestDoc.Fields[24].Note = ""
HTTPRequestDoc.Fields[24].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."
HTTPRequestDoc.Fields[24].Comments[encoder.LineComment] = "Unsafe specifies whether to use rawhttp engine for sending Non RFC-Compliant requests."
HTTPRequestDoc.Fields[25].Name = "race"
HTTPRequestDoc.Fields[25].Type = "bool"
HTTPRequestDoc.Fields[25].Note = ""
HTTPRequestDoc.Fields[25].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."
HTTPRequestDoc.Fields[25].Comments[encoder.LineComment] = "Race determines if all the request have to be attempted at the same time (Race Condition)"
HTTPRequestDoc.Fields[26].Name = "req-condition"
HTTPRequestDoc.Fields[26].Type = "bool"
HTTPRequestDoc.Fields[26].Note = ""
HTTPRequestDoc.Fields[26].Description = "ReqCondition automatically assigns numbers to requests and preserves their history.\n\nThis allows matching on them later for multi-request conditions."
HTTPRequestDoc.Fields[26].Comments[encoder.LineComment] = "ReqCondition automatically assigns numbers to requests and preserves their history."
HTTPRequestDoc.Fields[27].Name = "stop-at-first-match"
HTTPRequestDoc.Fields[27].Type = "bool"
HTTPRequestDoc.Fields[27].Note = ""
HTTPRequestDoc.Fields[27].Description = "StopAtFirstMatch stops the execution of the requests and template as soon as a match is found."
HTTPRequestDoc.Fields[27].Comments[encoder.LineComment] = "StopAtFirstMatch stops the execution of the requests and template as soon as a match is found."
HTTPRequestDoc.Fields[28].Name = "skip-variables-check"
HTTPRequestDoc.Fields[28].Type = "bool"
HTTPRequestDoc.Fields[28].Note = ""
HTTPRequestDoc.Fields[28].Description = "SkipVariablesCheck skips the check for unresolved variables in request"
HTTPRequestDoc.Fields[28].Comments[encoder.LineComment] = "SkipVariablesCheck skips the check for unresolved variables in request"
HTTPRequestDoc.Fields[29].Name = "iterate-all"
HTTPRequestDoc.Fields[29].Type = "bool"
HTTPRequestDoc.Fields[29].Note = ""
HTTPRequestDoc.Fields[29].Description = "IterateAll iterates all the values extracted from internal extractors"
HTTPRequestDoc.Fields[29].Comments[encoder.LineComment] = "IterateAll iterates all the values extracted from internal extractors"
HTTPRequestDoc.Fields[30].Name = "digest-username"
HTTPRequestDoc.Fields[30].Type = "string"
HTTPRequestDoc.Fields[30].Note = ""
HTTPRequestDoc.Fields[30].Description = "DigestAuthUsername specifies the username for digest authentication"
HTTPRequestDoc.Fields[30].Comments[encoder.LineComment] = "DigestAuthUsername specifies the username for digest authentication"
HTTPRequestDoc.Fields[31].Name = "digest-password"
HTTPRequestDoc.Fields[31].Type = "string"
HTTPRequestDoc.Fields[31].Note = ""
HTTPRequestDoc.Fields[31].Description = "DigestAuthPassword specifies the password for digest authentication"
HTTPRequestDoc.Fields[31].Comments[encoder.LineComment] = "DigestAuthPassword specifies the password for digest authentication"
HTTPRequestDoc.Fields[32].Name = "disable-path-automerge"
HTTPRequestDoc.Fields[32].Type = "bool"
HTTPRequestDoc.Fields[32].Note = ""
HTTPRequestDoc.Fields[32].Description = "DisablePathAutomerge disables merging target url path with raw request path"
HTTPRequestDoc.Fields[32].Comments[encoder.LineComment] = "DisablePathAutomerge disables merging target url path with raw request path"
HTTPRequestDoc.Fields[33].Name = "filters"
HTTPRequestDoc.Fields[33].Type = "[]matchers.Matcher"
HTTPRequestDoc.Fields[33].Note = ""
HTTPRequestDoc.Fields[33].Description = "Filter is matcher-like field to check if fuzzing should be performed on this request or not"
HTTPRequestDoc.Fields[33].Comments[encoder.LineComment] = "Filter is matcher-like field to check if fuzzing should be performed on this request or not"
HTTPRequestDoc.Fields[34].Name = "filters-condition"
HTTPRequestDoc.Fields[34].Type = "string"
HTTPRequestDoc.Fields[34].Note = ""
HTTPRequestDoc.Fields[34].Description = "Filter condition is the condition to apply on the filter (AND/OR). Default is OR"
HTTPRequestDoc.Fields[34].Comments[encoder.LineComment] = "Filter condition is the condition to apply on the filter (AND/OR). Default is OR"
GENERATORSAttackTypeHolderDoc.Type = "generators.AttackTypeHolder"
GENERATORSAttackTypeHolderDoc.Comments[encoder.LineComment] = " AttackTypeHolder is used to hold internal type of the protocol"
GENERATORSAttackTypeHolderDoc.Description = "AttackTypeHolder is used to hold internal type of the protocol"
GENERATORSAttackTypeHolderDoc.AppearsIn = []encoder.Appearance{
{
TypeName: "http.Request",
FieldName: "attack",
},
{
TypeName: "dns.Request",
FieldName: "attack",
},
{
TypeName: "network.Request",
FieldName: "attack",
},
{
TypeName: "headless.Request",
FieldName: "attack",
},
{
TypeName: "websocket.Request",
FieldName: "attack",
},
{
TypeName: "javascript.Request",
FieldName: "attack",
},
}
GENERATORSAttackTypeHolderDoc.Fields = make([]encoder.Doc, 1)
GENERATORSAttackTypeHolderDoc.Fields[0].Name = ""
GENERATORSAttackTypeHolderDoc.Fields[0].Type = "AttackType"
GENERATORSAttackTypeHolderDoc.Fields[0].Note = ""
GENERATORSAttackTypeHolderDoc.Fields[0].Description = ""
GENERATORSAttackTypeHolderDoc.Fields[0].Comments[encoder.LineComment] = ""
GENERATORSAttackTypeHolderDoc.Fields[0].EnumFields = []string{
"batteringram",
"pitchfork",
"clusterbomb",
}
HTTPMethodTypeHolderDoc.Type = "HTTPMethodTypeHolder"
HTTPMethodTypeHolderDoc.Comments[encoder.LineComment] = " HTTPMethodTypeHolder is used to hold internal type of the HTTP Method"
HTTPMethodTypeHolderDoc.Description = "HTTPMethodTypeHolder is used to hold internal type of the HTTP Method"
HTTPMethodTypeHolderDoc.AppearsIn = []encoder.Appearance{
{
TypeName: "http.Request",
FieldName: "method",
},
}
HTTPMethodTypeHolderDoc.Fields = make([]encoder.Doc, 1)
HTTPMethodTypeHolderDoc.Fields[0].Name = ""
HTTPMethodTypeHolderDoc.Fields[0].Type = "HTTPMethodType"
HTTPMethodTypeHolderDoc.Fields[0].Note = ""
HTTPMethodTypeHolderDoc.Fields[0].Description = ""
HTTPMethodTypeHolderDoc.Fields[0].Comments[encoder.LineComment] = ""
HTTPMethodTypeHolderDoc.Fields[0].EnumFields = []string{
"GET",
"HEAD",
"POST",
"PUT",
"DELETE",
"CONNECT",
"OPTIONS",
"TRACE",
"PATCH",
"PURGE",
"Debug",
}
FUZZRuleDoc.Type = "fuzz.Rule"
FUZZRuleDoc.Comments[encoder.LineComment] = " Rule is a single rule which describes how to fuzz the request"
FUZZRuleDoc.Description = "Rule is a single rule which describes how to fuzz the request"
FUZZRuleDoc.AppearsIn = []encoder.Appearance{
{
TypeName: "http.Request",
FieldName: "fuzzing",
},
{
TypeName: "headless.Request",
FieldName: "fuzzing",
},
}
FUZZRuleDoc.Fields = make([]encoder.Doc, 8)
FUZZRuleDoc.Fields[0].Name = "type"
FUZZRuleDoc.Fields[0].Type = "string"
FUZZRuleDoc.Fields[0].Note = ""
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."
FUZZRuleDoc.Fields[0].Comments[encoder.LineComment] = "Type is the type of fuzzing rule to perform."
FUZZRuleDoc.Fields[0].Values = []string{
"replace",
"prefix",
"postfix",
"infix",
}
FUZZRuleDoc.Fields[1].Name = "part"
FUZZRuleDoc.Fields[1].Type = "string"
FUZZRuleDoc.Fields[1].Note = ""
FUZZRuleDoc.Fields[1].Description = "Part is the part of request to fuzz.\n\nquery fuzzes the query part of url. More parts will be added later."
FUZZRuleDoc.Fields[1].Comments[encoder.LineComment] = "Part is the part of request to fuzz."
FUZZRuleDoc.Fields[1].Values = []string{
"query",
}
FUZZRuleDoc.Fields[2].Name = "mode"
FUZZRuleDoc.Fields[2].Type = "string"
FUZZRuleDoc.Fields[2].Note = ""
FUZZRuleDoc.Fields[2].Description = "Mode is the mode of fuzzing to perform.\n\nsingle fuzzes one value at a time. multiple fuzzes all values at same time."
FUZZRuleDoc.Fields[2].Comments[encoder.LineComment] = "Mode is the mode of fuzzing to perform."
FUZZRuleDoc.Fields[2].Values = []string{
"single",
"multiple",
}
FUZZRuleDoc.Fields[3].Name = "keys"
FUZZRuleDoc.Fields[3].Type = "[]string"
FUZZRuleDoc.Fields[3].Note = ""
FUZZRuleDoc.Fields[3].Description = "Keys is the optional list of key named parameters to fuzz."
FUZZRuleDoc.Fields[3].Comments[encoder.LineComment] = "Keys is the optional list of key named parameters to fuzz."
FUZZRuleDoc.Fields[3].AddExample("Examples of keys", []string{"url", "file", "host"})
FUZZRuleDoc.Fields[4].Name = "keys-regex"
FUZZRuleDoc.Fields[4].Type = "[]string"
FUZZRuleDoc.Fields[4].Note = ""
FUZZRuleDoc.Fields[4].Description = "KeysRegex is the optional list of regex key parameters to fuzz."
FUZZRuleDoc.Fields[4].Comments[encoder.LineComment] = "KeysRegex is the optional list of regex key parameters to fuzz."
FUZZRuleDoc.Fields[4].AddExample("Examples of key regex", []string{"url.*"})
FUZZRuleDoc.Fields[5].Name = "values"
FUZZRuleDoc.Fields[5].Type = "[]string"
FUZZRuleDoc.Fields[5].Note = ""
FUZZRuleDoc.Fields[5].Description = "Values is the optional list of regex value parameters to fuzz."
FUZZRuleDoc.Fields[5].Comments[encoder.LineComment] = "Values is the optional list of regex value parameters to fuzz."
FUZZRuleDoc.Fields[5].AddExample("Examples of value regex", []string{"https?://.*"})
FUZZRuleDoc.Fields[6].Name = "fuzz"
FUZZRuleDoc.Fields[6].Type = "SliceOrMapSlice"
FUZZRuleDoc.Fields[6].Note = ""
FUZZRuleDoc.Fields[6].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"
FUZZRuleDoc.Fields[6].Comments[encoder.LineComment] = " description: |"
FUZZRuleDoc.Fields[7].Name = "replace-regex"
FUZZRuleDoc.Fields[7].Type = "string"
FUZZRuleDoc.Fields[7].Note = ""
FUZZRuleDoc.Fields[7].Description = "replace-regex is regex for regex-replace rule type\nit is only required for replace-regex rule type"
FUZZRuleDoc.Fields[7].Comments[encoder.LineComment] = "replace-regex is regex for regex-replace rule type"
SliceOrMapSliceDoc.Type = "SliceOrMapSlice"
SliceOrMapSliceDoc.Comments[encoder.LineComment] = ""
SliceOrMapSliceDoc.Description = ""
SliceOrMapSliceDoc.AppearsIn = []encoder.Appearance{
{
TypeName: "fuzz.Rule",
FieldName: "fuzz",
},
}
SliceOrMapSliceDoc.Fields = make([]encoder.Doc, 0)
SignatureTypeHolderDoc.Type = "SignatureTypeHolder"
SignatureTypeHolderDoc.Comments[encoder.LineComment] = " SignatureTypeHolder is used to hold internal type of the signature"
SignatureTypeHolderDoc.Description = "SignatureTypeHolder is used to hold internal type of the signature"
SignatureTypeHolderDoc.AppearsIn = []encoder.Appearance{
{
TypeName: "http.Request",
FieldName: "signature",
},
}
SignatureTypeHolderDoc.Fields = make([]encoder.Doc, 0)
MATCHERSMatcherDoc.Type = "matchers.Matcher"
MATCHERSMatcherDoc.Comments[encoder.LineComment] = " Matcher is used to match a part in the output from a protocol."
MATCHERSMatcherDoc.Description = "Matcher is used to match a part in the output from a protocol."
MATCHERSMatcherDoc.AppearsIn = []encoder.Appearance{
{
TypeName: "http.Request",
FieldName: "filters",
},
}
MATCHERSMatcherDoc.Fields = make([]encoder.Doc, 16)
MATCHERSMatcherDoc.Fields[0].Name = "type"
MATCHERSMatcherDoc.Fields[0].Type = "MatcherTypeHolder"
MATCHERSMatcherDoc.Fields[0].Note = ""
MATCHERSMatcherDoc.Fields[0].Description = "Type is the type of the matcher."
MATCHERSMatcherDoc.Fields[0].Comments[encoder.LineComment] = "Type is the type of the matcher."
MATCHERSMatcherDoc.Fields[1].Name = "condition"
MATCHERSMatcherDoc.Fields[1].Type = "string"
MATCHERSMatcherDoc.Fields[1].Note = ""
MATCHERSMatcherDoc.Fields[1].Description = "Condition is the optional condition between two matcher variables. By default,\nthe condition is assumed to be OR."
MATCHERSMatcherDoc.Fields[1].Comments[encoder.LineComment] = "Condition is the optional condition between two matcher variables. By default,"
MATCHERSMatcherDoc.Fields[1].Values = []string{
"and",
"or",
}
MATCHERSMatcherDoc.Fields[2].Name = "part"
MATCHERSMatcherDoc.Fields[2].Type = "string"
MATCHERSMatcherDoc.Fields[2].Note = ""
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."
MATCHERSMatcherDoc.Fields[2].Comments[encoder.LineComment] = "Part is the part of the request response to match data from."
MATCHERSMatcherDoc.Fields[2].AddExample("", "body")
MATCHERSMatcherDoc.Fields[2].AddExample("", "raw")
MATCHERSMatcherDoc.Fields[3].Name = "negative"
MATCHERSMatcherDoc.Fields[3].Type = "bool"
MATCHERSMatcherDoc.Fields[3].Note = ""
MATCHERSMatcherDoc.Fields[3].Description = "Negative specifies if the match should be reversed\nIt will only match if the condition is not true."
MATCHERSMatcherDoc.Fields[3].Comments[encoder.LineComment] = "Negative specifies if the match should be reversed"
MATCHERSMatcherDoc.Fields[4].Name = "name"
MATCHERSMatcherDoc.Fields[4].Type = "string"
MATCHERSMatcherDoc.Fields[4].Note = ""
MATCHERSMatcherDoc.Fields[4].Description = "Name of the matcher. Name should be lowercase and must not contain\nspaces or underscores (_)."
MATCHERSMatcherDoc.Fields[4].Comments[encoder.LineComment] = "Name of the matcher. Name should be lowercase and must not contain"
MATCHERSMatcherDoc.Fields[4].AddExample("", "cookie-matcher")
MATCHERSMatcherDoc.Fields[5].Name = "status"
MATCHERSMatcherDoc.Fields[5].Type = "[]int"
MATCHERSMatcherDoc.Fields[5].Note = ""
MATCHERSMatcherDoc.Fields[5].Description = "Status are the acceptable status codes for the response."
MATCHERSMatcherDoc.Fields[5].Comments[encoder.LineComment] = "Status are the acceptable status codes for the response."
MATCHERSMatcherDoc.Fields[5].AddExample("", []int{200, 302})
MATCHERSMatcherDoc.Fields[6].Name = "size"
MATCHERSMatcherDoc.Fields[6].Type = "[]int"
MATCHERSMatcherDoc.Fields[6].Note = ""
MATCHERSMatcherDoc.Fields[6].Description = "Size is the acceptable size for the response"
MATCHERSMatcherDoc.Fields[6].Comments[encoder.LineComment] = "Size is the acceptable size for the response"
MATCHERSMatcherDoc.Fields[6].AddExample("", []int{3029, 2042})
MATCHERSMatcherDoc.Fields[7].Name = "words"
MATCHERSMatcherDoc.Fields[7].Type = "[]string"
MATCHERSMatcherDoc.Fields[7].Note = ""
MATCHERSMatcherDoc.Fields[7].Description = "Words contains word patterns required to be present in the response part."
MATCHERSMatcherDoc.Fields[7].Comments[encoder.LineComment] = "Words contains word patterns required to be present in the response part."
MATCHERSMatcherDoc.Fields[7].AddExample("Match for Outlook mail protection domain", []string{"mail.protection.outlook.com"})
MATCHERSMatcherDoc.Fields[7].AddExample("Match for application/json in response headers", []string{"application/json"})
MATCHERSMatcherDoc.Fields[8].Name = "regex"
MATCHERSMatcherDoc.Fields[8].Type = "[]string"
MATCHERSMatcherDoc.Fields[8].Note = ""
MATCHERSMatcherDoc.Fields[8].Description = "Regex contains Regular Expression patterns required to be present in the response part."
MATCHERSMatcherDoc.Fields[8].Comments[encoder.LineComment] = "Regex contains Regular Expression patterns required to be present in the response part."
MATCHERSMatcherDoc.Fields[8].AddExample("Match for Linkerd Service via Regex", []string{`(?mi)^Via\\s*?:.*?linkerd.*$`})
MATCHERSMatcherDoc.Fields[8].AddExample("Match for Open Redirect via Location header", []string{`(?m)^(?:Location\\s*?:\\s*?)(?:https?://|//)?(?:[a-zA-Z0-9\\-_\\.@]*)example\\.com.*$`})
MATCHERSMatcherDoc.Fields[9].Name = "binary"
MATCHERSMatcherDoc.Fields[9].Type = "[]string"
MATCHERSMatcherDoc.Fields[9].Note = ""
MATCHERSMatcherDoc.Fields[9].Description = "Binary are the binary patterns required to be present in the response part."
MATCHERSMatcherDoc.Fields[9].Comments[encoder.LineComment] = "Binary are the binary patterns required to be present in the response part."
MATCHERSMatcherDoc.Fields[9].AddExample("Match for Springboot Heapdump Actuator \"JAVA PROFILE\", \"HPROF\", \"Gunzip magic byte\"", []string{"4a4156412050524f46494c45", "4850524f46", "1f8b080000000000"})
MATCHERSMatcherDoc.Fields[9].AddExample("Match for 7zip files", []string{"377ABCAF271C"})
MATCHERSMatcherDoc.Fields[10].Name = "dsl"
MATCHERSMatcherDoc.Fields[10].Type = "[]string"
MATCHERSMatcherDoc.Fields[10].Note = ""
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/)."
MATCHERSMatcherDoc.Fields[10].Comments[encoder.LineComment] = "DSL are the dsl expressions that will be evaluated as part of nuclei matching rules."
MATCHERSMatcherDoc.Fields[10].AddExample("DSL Matcher for package.json file", []string{"contains(body, 'packages') && contains(tolower(all_headers), 'application/octet-stream') && status_code == 200"})
MATCHERSMatcherDoc.Fields[10].AddExample("DSL Matcher for missing strict transport security header", []string{"!contains(tolower(all_headers), ''strict-transport-security'')"})
MATCHERSMatcherDoc.Fields[11].Name = "xpath"
MATCHERSMatcherDoc.Fields[11].Type = "[]string"
MATCHERSMatcherDoc.Fields[11].Note = ""
MATCHERSMatcherDoc.Fields[11].Description = "XPath are the xpath queries expressions that will be evaluated against the response part."
MATCHERSMatcherDoc.Fields[11].Comments[encoder.LineComment] = "XPath are the xpath queries expressions that will be evaluated against the response part."
MATCHERSMatcherDoc.Fields[11].AddExample("XPath Matcher to check a title", []string{"/html/head/title[contains(text(), 'How to Find XPath')]"})
MATCHERSMatcherDoc.Fields[11].AddExample("XPath Matcher for finding links with target=\"_blank\"", []string{"//a[@target=\"_blank\"]"})
MATCHERSMatcherDoc.Fields[12].Name = "encoding"
MATCHERSMatcherDoc.Fields[12].Type = "string"
MATCHERSMatcherDoc.Fields[12].Note = ""
MATCHERSMatcherDoc.Fields[12].Description = "Encoding specifies the encoding for the words field if any."
MATCHERSMatcherDoc.Fields[12].Comments[encoder.LineComment] = "Encoding specifies the encoding for the words field if any."
MATCHERSMatcherDoc.Fields[12].Values = []string{
"hex",
}
MATCHERSMatcherDoc.Fields[13].Name = "case-insensitive"
MATCHERSMatcherDoc.Fields[13].Type = "bool"
MATCHERSMatcherDoc.Fields[13].Note = ""
MATCHERSMatcherDoc.Fields[13].Description = "CaseInsensitive enables case-insensitive matches. Default is false."
MATCHERSMatcherDoc.Fields[13].Comments[encoder.LineComment] = "CaseInsensitive enables case-insensitive matches. Default is false."
MATCHERSMatcherDoc.Fields[13].Values = []string{
"false",
"true",
}
MATCHERSMatcherDoc.Fields[14].Name = "match-all"
MATCHERSMatcherDoc.Fields[14].Type = "bool"
MATCHERSMatcherDoc.Fields[14].Note = ""
MATCHERSMatcherDoc.Fields[14].Description = "MatchAll enables matching for all matcher values. Default is false."
MATCHERSMatcherDoc.Fields[14].Comments[encoder.LineComment] = "MatchAll enables matching for all matcher values. Default is false."
MATCHERSMatcherDoc.Fields[14].Values = []string{
"false",
"true",
}
MATCHERSMatcherDoc.Fields[15].Name = "internal"
MATCHERSMatcherDoc.Fields[15].Type = "bool"
MATCHERSMatcherDoc.Fields[15].Note = ""
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"
MATCHERSMatcherDoc.Fields[15].Comments[encoder.LineComment] = " description: |"
MatcherTypeHolderDoc.Type = "MatcherTypeHolder"
MatcherTypeHolderDoc.Comments[encoder.LineComment] = " MatcherTypeHolder is used to hold internal type of the matcher"
MatcherTypeHolderDoc.Description = "MatcherTypeHolder is used to hold internal type of the matcher"
MatcherTypeHolderDoc.AppearsIn = []encoder.Appearance{
{
TypeName: "matchers.Matcher",
FieldName: "type",
},
}
MatcherTypeHolderDoc.Fields = make([]encoder.Doc, 1)
MatcherTypeHolderDoc.Fields[0].Name = ""
MatcherTypeHolderDoc.Fields[0].Type = "MatcherType"
MatcherTypeHolderDoc.Fields[0].Note = ""
MatcherTypeHolderDoc.Fields[0].Description = ""
MatcherTypeHolderDoc.Fields[0].Comments[encoder.LineComment] = ""
MatcherTypeHolderDoc.Fields[0].EnumFields = []string{
"word",
"regex",
"binary",
"status",
"size",
"dsl",
"xpath",
}
DNSRequestDoc.Type = "dns.Request"
DNSRequestDoc.Comments[encoder.LineComment] = " Request contains a DNS protocol request to be made from a template"
DNSRequestDoc.Description = "Request contains a DNS protocol request to be made from a template"
DNSRequestDoc.AddExample("", exampleNormalDNSRequest)
DNSRequestDoc.AppearsIn = []encoder.Appearance{
{