From f08a003d29ff03f95b32fb5a3dfa6632d717301f Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Tue, 11 Mar 2025 00:04:31 +0800 Subject: [PATCH] Fix typos Found via `codespell -L ines,te,ue,occured,ans` --- common/customheader/doc.go | 2 +- common/customlist/doc.go | 2 +- common/customports/doc.go | 2 +- common/fileutil/doc.go | 2 +- common/hashes/jarm/onetimepool.go | 2 +- common/httputilz/doc.go | 2 +- common/httpx/doc.go | 2 +- common/httpx/domains_test.go | 4 ++-- runner/runner.go | 2 +- runner/runner_test.go | 8 ++++---- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/common/customheader/doc.go b/common/customheader/doc.go index d55a0a2..b25a1a2 100644 --- a/common/customheader/doc.go +++ b/common/customheader/doc.go @@ -1,2 +1,2 @@ -// Package customheader contains all the funcionality to deal with Custom Global Headers +// Package customheader contains all the functionality to deal with Custom Global Headers package customheader diff --git a/common/customlist/doc.go b/common/customlist/doc.go index 5ae8d47..01b3444 100644 --- a/common/customlist/doc.go +++ b/common/customlist/doc.go @@ -1,2 +1,2 @@ -// Package customlist contains all the funcionality to deal with Custom Target List +// Package customlist contains all the functionality to deal with Custom Target List package customlist diff --git a/common/customports/doc.go b/common/customports/doc.go index 59b2404..e1afd3f 100644 --- a/common/customports/doc.go +++ b/common/customports/doc.go @@ -1,2 +1,2 @@ -// Package customport contains all the funcionality to deal with HTTP ports +// Package customport contains all the functionality to deal with HTTP ports package customport diff --git a/common/fileutil/doc.go b/common/fileutil/doc.go index 303af54..a4ae153 100644 --- a/common/fileutil/doc.go +++ b/common/fileutil/doc.go @@ -1,2 +1,2 @@ -// Package fileutil contains all the funcionality related to deal with files +// Package fileutil contains all the functionality related to deal with files package fileutil diff --git a/common/hashes/jarm/onetimepool.go b/common/hashes/jarm/onetimepool.go index a30fe6e..aa6f0b5 100644 --- a/common/hashes/jarm/onetimepool.go +++ b/common/hashes/jarm/onetimepool.go @@ -9,7 +9,7 @@ import ( "go.uber.org/multierr" ) -// oneTimePool is a pool designed to create continous bare connections that are for one time only usage +// oneTimePool is a pool designed to create continuous bare connections that are for one time only usage type oneTimePool struct { address string idleConnections chan net.Conn diff --git a/common/httputilz/doc.go b/common/httputilz/doc.go index 11805c6..00a19b8 100644 --- a/common/httputilz/doc.go +++ b/common/httputilz/doc.go @@ -1,2 +1,2 @@ -// Package httputilz contains all the funcionality related to common HTTP operations, dump, define methods... +// Package httputilz contains all the functionality related to common HTTP operations, dump, define methods... package httputilz diff --git a/common/httpx/doc.go b/common/httpx/doc.go index e7d2a5f..974a393 100644 --- a/common/httpx/doc.go +++ b/common/httpx/doc.go @@ -1,2 +1,2 @@ -// Package httpx containst the httpx common funcionality +// Package httpx containst the httpx common functionality package httpx diff --git a/common/httpx/domains_test.go b/common/httpx/domains_test.go index 2e11137..44ad778 100644 --- a/common/httpx/domains_test.go +++ b/common/httpx/domains_test.go @@ -14,10 +14,10 @@ var rawResponse string func TestBodyGrabDoamins(t *testing.T) { ht, err := New(&DefaultOptions) require.Nil(t, err) - resposne := &Response{ + response := &Response{ Raw: rawResponse, } - bd := ht.BodyDomainGrab(resposne) + bd := ht.BodyDomainGrab(response) sort.Strings(bd.Domains) sort.Strings(bd.Fqdns) diff --git a/runner/runner.go b/runner/runner.go index de8e649..43dba1c 100644 --- a/runner/runner.go +++ b/runner/runner.go @@ -1475,7 +1475,7 @@ func (r *Runner) targets(hp *httpx.HTTPX, target string) chan httpx.Target { switch { case stringsutil.HasPrefixAny(target, "*", "."): // A valid target does not contain: - // trim * and/or . (prefix) from the target to return the domain instead of wilcard + // trim * and/or . (prefix) from the target to return the domain instead of wildcard target = stringsutil.TrimPrefixAny(target, "*", ".") if !r.testAndSet(target) { return diff --git a/runner/runner_test.go b/runner/runner_test.go index f456c1a..82e46eb 100644 --- a/runner/runner_test.go +++ b/runner/runner_test.go @@ -31,7 +31,7 @@ func TestRunner_domain_targets(t *testing.T) { got = append(got, target) } } - require.ElementsMatch(t, expected, got, "could not exepcted output") + require.ElementsMatch(t, expected, got, "could not expected output") } func TestRunner_probeall_targets(t *testing.T) { @@ -62,7 +62,7 @@ func TestRunner_probeall_targets(t *testing.T) { got = append(got, target) } - require.ElementsMatch(t, expected, got, "could not exepcted output") + require.ElementsMatch(t, expected, got, "could not expected output") } func TestRunner_cidr_targets(t *testing.T) { @@ -87,7 +87,7 @@ func TestRunner_cidr_targets(t *testing.T) { got = append(got, target) } - require.ElementsMatch(t, expected, got, "could not exepcted output") + require.ElementsMatch(t, expected, got, "could not expected output") } func TestRunner_asn_targets(t *testing.T) { @@ -179,5 +179,5 @@ func TestRunner_urlWithComma_targets(t *testing.T) { got = append(got, target) } } - require.ElementsMatch(t, expected, got, "could not exepcted output") + require.ElementsMatch(t, expected, got, "could not expected output") }