diff --git a/pkg/fuzzer/fuzzer.go b/pkg/fuzzer/fuzzer.go index 2f11644..de7c603 100644 --- a/pkg/fuzzer/fuzzer.go +++ b/pkg/fuzzer/fuzzer.go @@ -22,46 +22,37 @@ func checkError(err error) { } func Get(Mu *sync.Mutex, domain, path string, progress float32, verbose bool) { - urjoinHTTP := "http://" + domain + path - urjoinHTTPS := "https://" + domain + path - - urls := []string{urjoinHTTP, urjoinHTTPS} - - for _, urjoin := range urls { - url, err := url.Parse(urjoin) - if err != nil { - log.Error().Err(err).Msgf("Error parsing URL: %s", urjoin) - continue - } + urjoin := "https://" + domain + path + url, err := url.Parse(urjoin) + if err != nil { + log.Error().Err(err).Msgf("Error parsing URL: %s", urjoin) + } - get, err := http.NewRequest("GET", url.String(), nil) - if err != nil { - log.Error().Err(err).Msgf("Error creating request for URL: %s", urjoin) - continue - } + get, err := http.NewRequest("GET", url.String(), nil) + if err != nil { + log.Error().Err(err).Msgf("Error creating request for URL: %s", urjoin) + } - client := &http.Client{ - Transport: &http.Transport{ - TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, - }, - } + client := &http.Client{ + Transport: &http.Transport{ + TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, + }, + } - resp, err := client.Do(get) - if err != nil { - log.Error().Err(err).Msgf("Error performing request for URL: %s", urjoin) - continue - } + resp, err := client.Do(get) + if err != nil { + log.Error().Err(err).Msgf("Error performing request for URL: %s", urjoin) + } - statusCode := float64(resp.StatusCode) - payload := &models.Url{Path: urjoin, Progress: progress, Status: statusCode} - payloadBuf := new(bytes.Buffer) - err = json.NewEncoder(payloadBuf).Encode(payload) - checkError(err) + statusCode := float64(resp.StatusCode) + payload := &models.Url{Path: urjoin, Progress: progress, Status: statusCode} + payloadBuf := new(bytes.Buffer) + err = json.NewEncoder(payloadBuf).Encode(payload) + checkError(err) - dfileHandler(Mu, domain, urjoin, statusCode, progress) - if verbose { - log.Info().Msg(fmt.Sprintf("%s => %s", urjoin, resp.Status)) - } + dfileHandler(Mu, domain, urjoin, statusCode, progress) + if verbose { + log.Info().Msg(fmt.Sprintf("%s => %s", urjoin, resp.Status)) } } diff --git a/static/js/fetchurls.js b/static/js/fetchurls.js index e786d1c..02d570c 100755 --- a/static/js/fetchurls.js +++ b/static/js/fetchurls.js @@ -9,10 +9,7 @@ function fetchUrls() { // Get container element const container = document.getElementById("container"); var bar = document.querySelector(".progress-bar"); - var cardHeader = document.querySelector(".card-header h5"); var speedElement = document.getElementById("data"); - - // Clear loading message and append data container.innerHTML = ""; data.Urls.forEach(url => {