Skip to content

Commit b8e18b2

Browse files
authored
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.
1 parent 2ba744f commit b8e18b2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/shortscan/shortscan.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,8 @@ func Scan(urls []string, hc *http.Client, st *httpStats, wc wordlistConfig, mk m
804804
// Grab some headers and make sure the URL is accessible
805805
res, err := fetch(hc, st, "GET", url+".aspx")
806806
if err != nil {
807-
log.WithFields(log.Fields{"error": err}).Fatal("Unable to access server")
807+
fmt.Printf("Unable to access server: %s\n", url)
808+
continue
808809
}
809810

810811
// Display server information

0 commit comments

Comments
 (0)