Skip to content

Commit

Permalink
Merge pull request #1034 from geeknik/patch-4
Browse files Browse the repository at this point in the history
Update templates_doc.go
  • Loading branch information
forgedhallpass committed Sep 16, 2021
2 parents 818838a + c5a1753 commit ef39802
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 19 deletions.
10 changes: 5 additions & 5 deletions SYNTAX-REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -981,7 +981,7 @@ Examples:


```yaml
# Follow upto 5 redirects
# Follow up to 5 redirects
max-redirects: 5
```

Expand Down Expand Up @@ -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>

Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion nuclei-jsonschema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
4 changes: 2 additions & 2 deletions v2/pkg/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//
Expand Down
3 changes: 2 additions & 1 deletion v2/pkg/operators/operators.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion v2/pkg/protocols/headless/engine/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions v2/pkg/protocols/http/build_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions v2/pkg/protocols/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion v2/pkg/protocols/network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//
Expand Down
2 changes: 1 addition & 1 deletion v2/pkg/reporting/exporters/es/elasticsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
6 changes: 3 additions & 3 deletions v2/pkg/templates/templates_doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit ef39802

Please sign in to comment.