Skip to content

Commit 2532c21

Browse files
committed
adding further optimization
1 parent a9961d4 commit 2532c21

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

runner/runner.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"io/ioutil"
1111
"net/http"
1212
"net/http/httputil"
13+
"net/url"
1314
"os"
1415
"path"
1516
"regexp"
@@ -416,7 +417,7 @@ func (r *Runner) RunEnumeration() {
416417
protocol := r.options.protocol
417418
// attempt to parse url as is
418419
if r.options.NoFallbackScheme {
419-
if u, err := urlutil.Parse(t); err == nil {
420+
if u, err := url.Parse(t); err == nil && (u.Scheme == httpx.HTTP || u.Scheme == httpx.HTTPS) {
420421
protocol = u.Scheme
421422
}
422423
}

0 commit comments

Comments
 (0)