Merge pull request #1034 from geeknik/patch-4

Update templates_doc.go
This commit is contained in:
forgedhallpass 2021-09-16 22:13:35 +03:00 committed by GitHub
commit ef39802555
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 20 additions and 19 deletions

View File

@ -348,7 +348,7 @@ Examples:
```yaml
description: Bower is a package manager which stores packages information in bower.json file
description: Bower is a package manager which stores package information in the bower.json file
```
```yaml
@ -981,7 +981,7 @@ Examples:
```yaml
# Follow upto 5 redirects
# Follow up to 5 redirects
max-redirects: 5
```
@ -1127,7 +1127,7 @@ This can be used in conjunction with `max-redirects` to control the HTTP request
Pipeline defines if the attack should be performed with HTTP 1.1 Pipelining
All requests must be indempotent (GET/POST). This can be used for race conditions/billions requests.
All requests must be idempotent (GET/POST). This can be used for race conditions/billions requests.
</div>
@ -2484,8 +2484,8 @@ Valid values:
Read is the number of bytes to read from socket.
This can be used for protcols which expected an immediate response. You can
read and write responses one after another and evetually perform matching
This can be used for protocols which expect an immediate response. You can
read and write responses one after another and eventually perform matching
on every data captured with `name` attribute.
The [network docs](https://nuclei.projectdiscovery.io/templating-guide/protocols/network/) highlight more on how to do this.

View File

@ -57,7 +57,7 @@
"title": "description of the template",
"description": "In-depth explanation on what the template does",
"examples": [
"Bower is a package manager which stores packages informations in bower.json file"
"Bower is a package manager which stores package information in the bower.json file"
]
},
"reference": {

View File

@ -36,9 +36,9 @@ type Info struct {
// You can go in-depth here on what the template actually does.
//
// examples:
// - value: "\"Bower is a package manager which stores packages information in bower.json file\""
// - value: "\"Bower is a package manager which stores package information in the bower.json file\""
// - value: "\"Subversion ALM for the enterprise before 8.8.2 allows reflected XSS at multiple locations\""
Description string `json:"description,omitempty" yaml:"description,omitempty" jsonschema:"title=description of the template,description=In-depth explanation on what the template does,example=Bower is a package manager which stores packages informations in bower.json file"`
Description string `json:"description,omitempty" yaml:"description,omitempty" jsonschema:"title=description of the template,description=In-depth explanation on what the template does,example=Bower is a package manager which stores package information in the bower.json file"`
// description: |
// References for the template.
//

View File

@ -161,7 +161,8 @@ func (r *Operators) Execute(data map[string]interface{}, match MatchFunc, extrac
if len(result.DynamicValues) > 0 {
return result, true
}
// Don't print if we have matchers, and they have not matched, regardless of extractor
// Don't print if we have matchers and they have not matched, regardless of extractor
if len(r.Matchers) > 0 && !matches {
return nil, false
}

View File

@ -18,7 +18,7 @@ type Instance struct {
// NewInstance creates a new instance for the current browser.
//
// The login process is repeated only once for a browser, and the created
// isolated browser instance is used for entire navigation ony be one.
// isolated browser instance is used for entire navigation one by one.
//
// Users can also choose to run the login->actions process again
// which uses a new incognito browser instance to run actions.

View File

@ -114,7 +114,7 @@ func (r *requestGenerator) makeHTTPRequestFromModel(ctx context.Context, data st
// request values.
finalValues := generators.MergeMaps(generatorValues, values)
// Evaulate the expressions for the request if any.
// Evaluate the expressions for the request if any.
var err error
data, err = expressions.Evaluate(data, finalValues)
if err != nil {
@ -153,7 +153,7 @@ func (r *requestGenerator) handleRawWithPayloads(ctx context.Context, rawRequest
// request values.
finalValues := generators.MergeMaps(generatorValues, values)
// Evaulate the expressions for raw request if any.
// Evaluate the expressions for raw request if any.
var err error
rawRequest, err = expressions.Evaluate(rawRequest, finalValues)
if err != nil {

View File

@ -92,7 +92,7 @@ type Request struct {
// description: |
// MaxRedirects is the maximum number of redirects that should be followed.
// examples:
// - name: Follow upto 5 redirects
// - name: Follow up to 5 redirects
// value: "5"
MaxRedirects int `yaml:"max-redirects,omitempty" jsonschema:"title=maximum number of redirects to follow,description=Maximum number of redirects that should be followed"`
// description: |
@ -145,7 +145,7 @@ type Request struct {
// description: |
// Pipeline defines if the attack should be performed with HTTP 1.1 Pipelining
//
// All requests must be indempotent (GET/POST). This can be used for race conditions/billions requests.
// All requests must be idempotent (GET/POST). This can be used for race conditions/billions requests.
Pipeline bool `yaml:"pipeline,omitempty" jsonschema:"title=perform HTTP 1.1 pipelining,description=Pipeline defines if the attack should be performed with HTTP 1.1 Pipelining"`
// description: |
// Unsafe specifies whether to use rawhttp engine for sending Non RFC-Compliant requests.

View File

@ -97,7 +97,7 @@ type Input struct {
// description: |
// Read is the number of bytes to read from socket.
//
// This can be used for protcols which expected an immediate response. You can
// This can be used for protocols which expect an immediate response. You can
// read and write responses one after another and evetually perform matching
// on every data captured with `name` attribute.
//

View File

@ -28,7 +28,7 @@ type Options struct {
SSLVerification bool `yaml:"ssl-verification"`
// Username for the elasticsearch instance
Username string `yaml:"username"`
// Pasword is the password for elasticsearch instance
// Password is the password for elasticsearch instance
Password string `yaml:"password"`
// IndexName is the name of the elasticsearch index
IndexName string `yaml:"index-name"`

View File

@ -373,7 +373,7 @@ func init() {
HTTPRequestDoc.Fields[13].Description = "MaxRedirects is the maximum number of redirects that should be followed."
HTTPRequestDoc.Fields[13].Comments[encoder.LineComment] = "MaxRedirects is the maximum number of redirects that should be followed."
HTTPRequestDoc.Fields[13].AddExample("Follow upto 5 redirects", 5)
HTTPRequestDoc.Fields[13].AddExample("Follow up to 5 redirects", 5)
HTTPRequestDoc.Fields[14].Name = "pipeline-concurrent-connections"
HTTPRequestDoc.Fields[14].Type = "int"
HTTPRequestDoc.Fields[14].Note = ""
@ -415,7 +415,7 @@ func init() {
HTTPRequestDoc.Fields[20].Name = "pipeline"
HTTPRequestDoc.Fields[20].Type = "bool"
HTTPRequestDoc.Fields[20].Note = ""
HTTPRequestDoc.Fields[20].Description = "Pipeline defines if the attack should be performed with HTTP 1.1 Pipelining\n\nAll requests must be indempotent (GET/POST). This can be used for race conditions/billions requests."
HTTPRequestDoc.Fields[20].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[20].Comments[encoder.LineComment] = "Pipeline defines if the attack should be performed with HTTP 1.1 Pipelining"
HTTPRequestDoc.Fields[21].Name = "unsafe"
HTTPRequestDoc.Fields[21].Type = "bool"
@ -919,7 +919,7 @@ func init() {
NETWORKInputDoc.Fields[2].Name = "read"
NETWORKInputDoc.Fields[2].Type = "int"
NETWORKInputDoc.Fields[2].Note = ""
NETWORKInputDoc.Fields[2].Description = "Read is the number of bytes to read from socket.\n\nThis can be used for protcols which expected an immediate response. You can\nread and write responses one after another and evetually 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."
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 evetually 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."
NETWORKInputDoc.Fields[2].Comments[encoder.LineComment] = "Read is the number of bytes to read from socket."
NETWORKInputDoc.Fields[2].AddExample("", 1024)