insecure by default

This commit is contained in:
edoardottt
2022-11-18 21:32:27 +01:00
parent eb9a91e268
commit 7ce0f4e739
2 changed files with 5 additions and 11 deletions
+5 -8
View File
@@ -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
}
-3
View File
@@ -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,