From 8020bc726d78dac47bf47cf8e67f42aafaa749f9 Mon Sep 17 00:00:00 2001 From: CyberRoute Date: Fri, 18 Aug 2023 18:07:00 +0200 Subject: [PATCH] parsing url --- pkg/fuzzer/fuzzer.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/fuzzer/fuzzer.go b/pkg/fuzzer/fuzzer.go index 0f25477..5998bd6 100644 --- a/pkg/fuzzer/fuzzer.go +++ b/pkg/fuzzer/fuzzer.go @@ -7,6 +7,7 @@ import ( "fmt" "io" "net/http" + "net/url" "os" "sync" @@ -22,8 +23,12 @@ func checkError(err error) { func Get(Mu *sync.Mutex, domain, path string, progress float32, verbose bool) { urjoin := "http://" + domain + path + url, err := url.Parse(urjoin) + if err != nil { + log.Error().Err(err).Msg("") + } - get, err := http.NewRequest("GET", urjoin, nil) + get, err := http.NewRequest("GET", url.String(), nil) if err != nil { log.Error().Err(err).Msg("") return