Skip to content

Commit

Permalink
handle timeout exception
Browse files Browse the repository at this point in the history
  • Loading branch information
musana authored Jun 28, 2022
1 parent 7f9e42b commit 1efd030
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions fuzzuli.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,12 @@ func headRequest(domain string, wordlist []string) {
client := httpClient(options.proxy)
resp, err := client.Do(requestBuilder(url))

if err != nil {
return
if err, ok := err.(net.Error); ok && err.Timeout() {
fmt.Println(string("\033[33m")+"[!] Timeout. Skipping :: "+url, string("\033[0m"))
continue
} else if err != nil {
fmt.Println(string("\033[31m")+"[!] Something went wrong. Exiting :: "+url, string("\033[0m"))
os.Exit(1)
}

if _, ok := resp.Header["Content-Length"]; ok {
Expand Down Expand Up @@ -385,7 +389,7 @@ func ParseOptions() *Options {

_ = flagSet.Parse()

Version := "0.0.1"
Version := "0.0.2"
if options.version {
fmt.Println("Current Version:", Version)
os.Exit(0)
Expand Down

0 comments on commit 1efd030

Please sign in to comment.