Skip to content

Commit e865ca4

Browse files
Merge pull request #6661 from didier-durand/fix-typos-b
[Doc] Fixing typos in various files
2 parents 9ec2e99 + 6384399 commit e865ca4

File tree

9 files changed

+18
-18
lines changed

9 files changed

+18
-18
lines changed

SYNTAX-REFERENCE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,7 @@ cpe: cpe:/a:vendor:product:version
961961
962962
963963
## http.Request
964-
Request contains a http request to be made from a template
964+
Request contains an http request to be made from a template
965965
966966
Appears in:
967967

lib/multi.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ func (e *ThreadSafeNucleiEngine) GlobalResultCallback(callback func(event *outpu
120120
}
121121

122122
// ExecuteNucleiWithOptsCtx executes templates on targets and calls callback on each result(only if results are found)
123-
// This method can be called concurrently and it will use some global resources but can be runned parallelly
123+
// This method can be called concurrently and it will use some global resources but can be run parallelly
124124
// by invoking this method with different options and targets
125125
// Note: Not all options are thread-safe. this method will throw error if you try to use non-thread-safe options
126126
func (e *ThreadSafeNucleiEngine) ExecuteNucleiWithOptsCtx(ctx context.Context, targets []string, opts ...NucleiSDKOptions) error {

pkg/catalog/loader/loader.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ func New(cfg *Config) (*Store, error) {
185185
})
186186

187187
// Do a check to see if we have URLs in templates flag, if so
188-
// we need to processs them separately and remove them from the initial list
188+
// we need to process them separately and remove them from the initial list
189189
var templatesFinal []string
190190
for _, template := range cfg.Templates {
191191
// TODO: Add and replace this with urlutil.IsURL() helper

pkg/js/CONTRIBUTE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Javascript Protocol Documentation is auto-generated using [jsdoc] and is hosted
6767

6868
### Javascript Code Guidelines
6969

70-
1. Catch exceptions using `try/catch` blocks and handle errors gracefully, showing useful information. By default, the implementation returns a Go error on a unhandled exception along with stack trace in debug mode.
71-
2. Use `let`/`cost` instead of `var` to declare variables.
70+
1. Catch exceptions using `try/catch` blocks and handle errors gracefully, showing useful information. By default, the implementation returns a Go error on an unhandled exception along with stack trace in debug mode.
71+
2. Use `let`/`const` instead of `var` to declare variables.
7272
3. Keep the global scope clean. The VMs are not shared so do not rely on VM state.
7373
4. Use functions to divide the code and keep the implementation clean.

pkg/js/compiler/pool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ func stringify(gojaValue goja.Value, runtime *goja.Runtime) string {
242242
return result.String()
243243
}
244244
}
245-
// unlikely but if to_json throwed some error use native json.Marshal
245+
// unlikely but if to_json threw some error use native json.Marshal
246246
val := value
247247
if kind == reflect.Ptr {
248248
val = reflect.ValueOf(value).Elem().Interface()

pkg/protocols/http/http.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ func (request *Request) Compile(options *protocols.ExecutorOptions) error {
506506
stats.Increment(SetThreadToCountZero)
507507
request.Threads = 0
508508
} else {
509-
// specifically for http requests high concurrency and and threads will lead to memory exausthion, hence reduce the maximum parallelism
509+
// specifically for http requests high concurrency and threads will lead to memory exhaustion, hence reduce the maximum parallelism
510510
if protocolstate.IsLowOnMemory() {
511511
request.Threads = protocolstate.GuardThreadsOrDefault(request.Threads)
512512
}

pkg/protocols/protocols.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ func (e *ExecutorOptions) GetTemplateCtx(input *contextargs.MetaInput) *contexta
213213
// AddTemplateVars adds vars to template context with given template type as prefix
214214
// this method is no-op if template is not multi protocol
215215
func (e *ExecutorOptions) AddTemplateVars(input *contextargs.MetaInput, reqType templateTypes.ProtocolType, reqID string, vars map[string]interface{}) {
216-
// if we wan't to disable adding response variables and other variables to template context
216+
// if we want to disable adding response variables and other variables to template context
217217
// this is the statement that does it . template context is currently only enabled for
218218
// multiprotocol and flow templates
219219
if !e.IsMultiProtocol && e.Flow == "" {

pkg/tmplexec/flow/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,13 @@ The update template now seems straight forward and easy to understand. we are fi
108108
- update variables at runtime (ex: when jwt expires update it by using refresh token and then continue execution)
109109
- and a lot more (this is just a tip of iceberg)
110110

111-
simply put request execution orchestration can be understood as nuclei logic bindings for javascript (i.e. two way interaction between javascript and nuclei for a specific template)
111+
simply put request execution orchestration can be understood as nuclei logic bindings for javascript (i.e. two-way interaction between javascript and nuclei for a specific template)
112112

113113
To better understand orchestration we can try to build a template for vhost enumeration using flow. which usually requires writing / using a new tool
114114

115115
**for basic vhost enumeration a template should**
116116
- do a PTR lookup for given ip
117-
- get SSL certificate for given ip (i.e tls-grab)
117+
- get SSL certificate for given ip (i.e. tls-grab)
118118
- extract subject_cn from certificate
119119
- extract subject_alt_names(SAN) from certificate
120120
- filter out wildcard prefix from above values
@@ -164,7 +164,7 @@ http:
164164
dsl:
165165
- '"VHOST: " + vhost + ", SC: " + status_code + ", CL: " + content_length' tarun@macbook:~/Codebase/nuclei/integration_tes
166166
```
167-
**But this template is not yet ready as it is missing core logic i.e how we use all these obtained data and do bruteforce**
167+
**But this template is not yet ready as it is missing core logic i.e. how we use all these obtained data and do bruteforce**
168168
and this is where flow comes into picture. flow is javascript code with two way bindings to nuclei. if we write javascript code to orchestrate vhost enumeration it is as simple as
169169
```javascript
170170
ssl();

pkg/tmplexec/flow/flow_executor_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func TestFlowTemplateWithIndex(t *testing.T) {
5050
Template, err := templates.Parse("testcases/nuclei-flow-dns.yaml", nil, executerOpts)
5151
require.Nil(t, err, "could not parse template")
5252

53-
require.True(t, Template.Flow != "", "not a flow template") // this is classifer if template is flow or not
53+
require.True(t, Template.Flow != "", "not a flow template") // this is classifier if template is flow or not
5454

5555
err = Template.Executer.Compile()
5656
require.Nil(t, err, "could not compile template")
@@ -69,7 +69,7 @@ func TestFlowTemplateWithID(t *testing.T) {
6969
Template, err := templates.Parse("testcases/nuclei-flow-dns-id.yaml", nil, executerOpts)
7070
require.Nil(t, err, "could not parse template")
7171

72-
require.True(t, Template.Flow != "", "not a flow template") // this is classifer if template is flow or not
72+
require.True(t, Template.Flow != "", "not a flow template") // this is classifier if template is flow or not
7373

7474
err = Template.Executer.Compile()
7575
require.Nil(t, err, "could not compile template")
@@ -91,7 +91,7 @@ func TestFlowWithProtoPrefix(t *testing.T) {
9191
Template, err := templates.Parse("testcases/nuclei-flow-dns-prefix.yaml", nil, executerOpts)
9292
require.Nil(t, err, "could not parse template")
9393

94-
require.True(t, Template.Flow != "", "not a flow template") // this is classifer if template is flow or not
94+
require.True(t, Template.Flow != "", "not a flow template") // this is classifier if template is flow or not
9595

9696
err = Template.Executer.Compile()
9797
require.Nil(t, err, "could not compile template")
@@ -111,7 +111,7 @@ func TestFlowWithConditionNegative(t *testing.T) {
111111
Template, err := templates.Parse("testcases/condition-flow.yaml", nil, executerOpts)
112112
require.Nil(t, err, "could not parse template")
113113

114-
require.True(t, Template.Flow != "", "not a flow template") // this is classifer if template is flow or not
114+
require.True(t, Template.Flow != "", "not a flow template") // this is classifier if template is flow or not
115115

116116
err = Template.Executer.Compile()
117117
require.Nil(t, err, "could not compile template")
@@ -132,7 +132,7 @@ func TestFlowWithConditionPositive(t *testing.T) {
132132
Template, err := templates.Parse("testcases/condition-flow.yaml", nil, executerOpts)
133133
require.Nil(t, err, "could not parse template")
134134

135-
require.True(t, Template.Flow != "", "not a flow template") // this is classifer if template is flow or not
135+
require.True(t, Template.Flow != "", "not a flow template") // this is classifier if template is flow or not
136136

137137
err = Template.Executer.Compile()
138138
require.Nil(t, err, "could not compile template")
@@ -153,7 +153,7 @@ func TestFlowWithNoMatchers(t *testing.T) {
153153
Template, err := templates.Parse("testcases/condition-flow-no-operators.yaml", nil, executerOpts)
154154
require.Nil(t, err, "could not parse template")
155155

156-
require.True(t, Template.Flow != "", "not a flow template") // this is classifer if template is flow or not
156+
require.True(t, Template.Flow != "", "not a flow template") // this is classifier if template is flow or not
157157

158158
err = Template.Executer.Compile()
159159
require.Nil(t, err, "could not compile template")
@@ -169,7 +169,7 @@ func TestFlowWithNoMatchers(t *testing.T) {
169169
Template, err := templates.Parse("testcases/condition-flow-extractors.yaml", nil, executerOpts)
170170
require.Nil(t, err, "could not parse template")
171171

172-
require.True(t, Template.Flow != "", "not a flow template") // this is classifer if template is flow or not
172+
require.True(t, Template.Flow != "", "not a flow template") // this is classifier if template is flow or not
173173

174174
err = Template.Executer.Compile()
175175
require.Nil(t, err, "could not compile template")

0 commit comments

Comments
 (0)