From b8e18b2477eb9036967b34f4176c7aed96bee14a Mon Sep 17 00:00:00 2001 From: sp0iler <79294774+sp0ilerr@users.noreply.github.com> Date: Wed, 8 Jan 2025 15:04:48 -0600 Subject: [PATCH] Update shortscan.go Updated error handling when the server is inaccessible. If the server is not accessible it will simply print the error and continue rather than throwing a fatal error. This will allow scans that are iterating over multiple servers in a file to continue if an inaccessible server is hit. --- pkg/shortscan/shortscan.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/shortscan/shortscan.go b/pkg/shortscan/shortscan.go index 798ef35..7036367 100644 --- a/pkg/shortscan/shortscan.go +++ b/pkg/shortscan/shortscan.go @@ -804,7 +804,8 @@ func Scan(urls []string, hc *http.Client, st *httpStats, wc wordlistConfig, mk m // Grab some headers and make sure the URL is accessible res, err := fetch(hc, st, "GET", url+".aspx") if err != nil { - log.WithFields(log.Fields{"error": err}).Fatal("Unable to access server") + fmt.Printf("Unable to access server: %s\n", url) + continue } // Display server information