diff --git a/.goreleaser.yml b/.goreleaser.yml index d33aabc1f..2d2f61379 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -38,9 +38,9 @@ builds: # goarch: [amd64] archives: - - format: zip + - formats: [zip] id: nuclei - builds: [nuclei-cli] + ids: [nuclei-cli] name_template: '{{ .ProjectName }}_{{ .Version }}_{{ if eq .Os "darwin" }}macOS{{ else }}{{ .Os }}{{ end }}_{{ .Arch }}' checksum: diff --git a/README_KR.md b/README_KR.md index c59825cdb..6181c866b 100644 --- a/README_KR.md +++ b/README_KR.md @@ -341,7 +341,7 @@ Nuclei를 사용하면 자체 검사 모음으로 테스트 접근 방식을 사 - 몇 분 안에 수천 개의 호스트를 처리할 수 있음. - 간단한 YAML DSL로 사용자 지정 테스트 접근 방식을 쉽게 자동화할 수 있음. -버그 바운티 워크플로에 맞는 다른 오픈 소스 프로젝트를 확인할 수 있습니다.: [github.com/projectdiscovery](http://github.com/projectdiscovery), 또한, 우리는 매일 [Chaos에서 DNS 데이터를 갱신해 호스팅합니다.](http://chaos.projectdiscovery.io). +버그 바운티 워크플로에 맞는 다른 오픈 소스 프로젝트를 확인할 수 있습니다.: [github.com/projectdiscovery](http://github.com/projectdiscovery), 또한, 우리는 매일 [Chaos에서 DNS 데이터를 갱신해 호스팅합니다](http://chaos.projectdiscovery.io). diff --git a/cmd/docgen/docgen.go b/cmd/docgen/docgen.go index 51c2a195d..ca075a19c 100644 --- a/cmd/docgen/docgen.go +++ b/cmd/docgen/docgen.go @@ -19,7 +19,9 @@ func writeToFile(filename string, data []byte) { if err != nil { log.Fatalf("Could not create file %s: %s\n", filename, err) } - defer file.Close() + defer func() { + _ = file.Close() + }() _, err = file.Write(data) if err != nil { diff --git a/cmd/functional-test/main.go b/cmd/functional-test/main.go index 78114fdb3..9e605522f 100644 --- a/cmd/functional-test/main.go +++ b/cmd/functional-test/main.go @@ -41,7 +41,9 @@ func runFunctionalTests(debug bool) (error, bool) { if err != nil { return errors.Wrap(err, "could not open test cases"), true } - defer file.Close() + defer func() { + _ = file.Close() + }() errored, failedTestCases := runTestCases(file, debug) diff --git a/cmd/generate-checksum/main.go b/cmd/generate-checksum/main.go index a381387fa..9a3e7b8ed 100644 --- a/cmd/generate-checksum/main.go +++ b/cmd/generate-checksum/main.go @@ -23,7 +23,9 @@ func main() { if err != nil { log.Fatalf("Could not create file: %s\n", err) } - defer file.Close() + defer func() { + _ = file.Close() + }() err = filepath.WalkDir(templatesDirectory, func(path string, d fs.DirEntry, err error) error { if err != nil || d.IsDir() { diff --git a/cmd/integration-test/custom-dir.go b/cmd/integration-test/custom-dir.go index 550027f06..b1ea83cc6 100644 --- a/cmd/integration-test/custom-dir.go +++ b/cmd/integration-test/custom-dir.go @@ -18,7 +18,9 @@ func (h *customConfigDirTest) Execute(filePath string) error { if err != nil { return err } - defer os.RemoveAll(customTempDirectory) + defer func() { + _ = os.RemoveAll(customTempDirectory) + }() results, err := testutils.RunNucleiBareArgsAndGetResults(debug, []string{"NUCLEI_CONFIG_DIR=" + customTempDirectory}, "-t", filePath, "-u", "8x8exch02.8x8.com") if err != nil { return err diff --git a/cmd/integration-test/dsl.go b/cmd/integration-test/dsl.go index 4e4a275ef..c311b8292 100644 --- a/cmd/integration-test/dsl.go +++ b/cmd/integration-test/dsl.go @@ -21,7 +21,7 @@ type dslVersionWarning struct{} func (d *dslVersionWarning) Execute(templatePath string) error { router := httprouter.New() router.GET("/", func(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { - fmt.Fprintf(w, "DSL version parsing warning test") + _, _ = fmt.Fprintf(w, "DSL version parsing warning test") }) ts := httptest.NewServer(router) defer ts.Close() @@ -37,7 +37,7 @@ type dslShowVersionWarning struct{} func (d *dslShowVersionWarning) Execute(templatePath string) error { router := httprouter.New() router.GET("/", func(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { - fmt.Fprintf(w, "DSL version parsing warning test") + _, _ = fmt.Fprintf(w, "DSL version parsing warning test") }) ts := httptest.NewServer(router) defer ts.Close() diff --git a/cmd/integration-test/flow.go b/cmd/integration-test/flow.go index 46ae7cf5f..1c103b95a 100644 --- a/cmd/integration-test/flow.go +++ b/cmd/integration-test/flow.go @@ -49,7 +49,7 @@ func (t *iterateValuesFlow) Execute(filePath string) error { } router.GET("/", func(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { w.WriteHeader(http.StatusOK) - _, _ = w.Write([]byte(fmt.Sprint(testemails))) + _, _ = fmt.Fprint(w, testemails) }) router.GET("/user/"+getBase64(testemails[0]), func(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { w.WriteHeader(http.StatusOK) diff --git a/cmd/integration-test/fuzz.go b/cmd/integration-test/fuzz.go index 230fff031..c2c4bee3a 100644 --- a/cmd/integration-test/fuzz.go +++ b/cmd/integration-test/fuzz.go @@ -55,7 +55,7 @@ func (h *httpFuzzQuery) Execute(filePath string) error { router.GET("/", func(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { w.Header().Set("Content-Type", "text/html") value := r.URL.Query().Get("id") - fmt.Fprintf(w, "This is test matcher text: %v", value) + _, _ = fmt.Fprintf(w, "This is test matcher text: %v", value) }) ts := httptest.NewTLSServer(router) defer ts.Close() @@ -75,7 +75,7 @@ func (h *fuzzModeOverride) Execute(filePath string) error { router.GET("/", func(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { w.Header().Set("Content-Type", "text/html") value := r.URL.Query().Get("id") - fmt.Fprintf(w, "This is test matcher text: %v", value) + _, _ = fmt.Fprintf(w, "This is test matcher text: %v", value) }) ts := httptest.NewTLSServer(router) defer ts.Close() @@ -120,7 +120,7 @@ func (h *fuzzTypeOverride) Execute(filePath string) error { router.GET("/", func(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { w.Header().Set("Content-Type", "text/html") value := r.URL.Query().Get("id") - fmt.Fprintf(w, "This is test matcher text: %v", value) + _, _ = fmt.Fprintf(w, "This is test matcher text: %v", value) }) ts := httptest.NewTLSServer(router) defer ts.Close() @@ -164,7 +164,7 @@ func (h *HeadlessFuzzingQuery) Execute(filePath string) error { router := httprouter.New() router.GET("/", func(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { resp := fmt.Sprintf("
%s", r.URL.Query().Get("url")) - fmt.Fprint(w, resp) + _, _ = fmt.Fprint(w, resp) }) ts := httptest.NewTLSServer(router) defer ts.Close() @@ -190,7 +190,7 @@ func (h *fuzzMultipleMode) Execute(filePath string) error { } w.Header().Set("Content-Type", "text/html") resp := fmt.Sprintf("