From 7ce0f4e739dbf789990ce2bc315db856312cafda Mon Sep 17 00:00:00 2001 From: edoardottt Date: Fri, 18 Nov 2022 21:32:27 +0100 Subject: [PATCH] insecure by default --- pkg/crawler/colly.go | 13 +++++-------- pkg/input/flags.go | 3 --- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/pkg/crawler/colly.go b/pkg/crawler/colly.go index 931298d..5668cc6 100644 --- a/pkg/crawler/colly.go +++ b/pkg/crawler/colly.go @@ -63,7 +63,6 @@ type Scan struct { EndpointsFlag bool ErrorsFlag bool InfoFlag bool - Insecure bool Intensive bool Plain bool Rua bool @@ -142,7 +141,7 @@ func New(scan *Scan) *Results { // crawler creation c := CreateColly(scan.Delay, scan.Concurrency, scan.Cache, scan.Timeout, - scan.Intensive, scan.Rua, scan.Proxy, scan.Insecure, scan.UserAgent, scan.Target) + scan.Intensive, scan.Rua, scan.Proxy, scan.UserAgent, scan.Target) // On every request that Colly is making, print the URL it's currently visiting c.OnRequest(func(e *colly.Request) { @@ -357,7 +356,7 @@ func New(scan *Scan) *Results { // CreateColly takes as input all the settings needed to instantiate // a new Colly Collector object and it returns this object. func CreateColly(delayTime int, concurrency int, cache bool, timeout int, - intensive bool, rua bool, proxy string, insecure bool, userAgent string, target string) *colly.Collector { + intensive bool, rua bool, proxy string, userAgent string, target string) *colly.Collector { c := colly.NewCollector( colly.Async(true), ) @@ -406,11 +405,9 @@ func CreateColly(delayTime int, concurrency int, cache bool, timeout int, } } - if insecure { - c.WithTransport(&http.Transport{ - TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, - }) - } + c.WithTransport(&http.Transport{ + TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, + }) return c } diff --git a/pkg/input/flags.go b/pkg/input/flags.go index 32c5352..a632e4b 100644 --- a/pkg/input/flags.go +++ b/pkg/input/flags.go @@ -53,7 +53,6 @@ type Input struct { Intensive bool Rua bool Proxy string - Insecure bool Secrets bool SecretsFile string Endpoints bool @@ -86,7 +85,6 @@ func ScanFlag() Input { intensivePtr := flag.Bool("intensive", false, "Crawl searching for resources matching 2nd level domain.") ruaPtr := flag.Bool("rua", false, "Use a random browser user agent on every request.") proxyPtr := flag.String("proxy", "", "Set a Proxy to be used (http and socks5 supported).") - insecurePtr := flag.Bool("insecure", false, "Ignore invalid HTTPS certificates") secretsPtr := flag.Bool("s", false, "Hunt for secrets.") secretsFilePtr := flag.String("sf", "", "Use an external file (txt, one per line)"+ @@ -129,7 +127,6 @@ func ScanFlag() Input { *intensivePtr, *ruaPtr, *proxyPtr, - *insecurePtr, *secretsPtr, *secretsFilePtr, *endpointsPtr,