diff --git a/core/crackmodule/httpbasic.go b/core/crackmodule/httpbasic.go index 0408d2b..7ee54cf 100644 --- a/core/crackmodule/httpbasic.go +++ b/core/crackmodule/httpbasic.go @@ -1,6 +1,7 @@ package crackmodule import ( + "crypto/tls" "cube/config" "cube/gologger" "net/http" @@ -37,8 +38,11 @@ func (h HttpBasic) CrackPortCheck() bool { func (h HttpBasic) Exec() CrackResult { result := CrackResult{Crack: *h.Crack, Result: false, Err: nil} + tr := &http.Transport{ + TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, + } - clt := http.Client{} + clt := http.Client{Transport: tr} if !strings.HasPrefix(h.Ip, "http") { gologger.Errorf("Invalid URL, eg: http://%s", h.Ip) } diff --git a/core/crackmodule/jenkins.go b/core/crackmodule/jenkins.go index 217c055..6f59074 100644 --- a/core/crackmodule/jenkins.go +++ b/core/crackmodule/jenkins.go @@ -2,6 +2,7 @@ package crackmodule import ( "bufio" + "crypto/tls" "cube/config" "cube/gologger" "net/http" @@ -41,8 +42,11 @@ func (j Jenkins) CrackPortCheck() bool { func (j Jenkins) Exec() CrackResult { result := CrackResult{Crack: *j.Crack, Result: false, Err: nil} + tr := &http.Transport{ + TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, + } - clt := http.Client{} + clt := http.Client{Transport: tr} if !strings.HasPrefix(j.Ip, "http") { gologger.Errorf("Invalid URL, eg: http://%s", j.Ip) } @@ -79,8 +83,10 @@ func (j Jenkins) Exec() CrackResult { jar, _ := cookiejar.New(nil) host, _ := url.Parse(j.Ip) jar.SetCookies(host, resp.Cookies()) + clt2 := http.Client{ - Jar: jar, + Jar: jar, + Transport: tr, } urlValues := url.Values{} urlValues.Add("j_username", j.Auth.User) diff --git a/core/crackmodule/phpmyadmin.go b/core/crackmodule/phpmyadmin.go index 02f2853..3cba777 100644 --- a/core/crackmodule/phpmyadmin.go +++ b/core/crackmodule/phpmyadmin.go @@ -2,6 +2,7 @@ package crackmodule import ( "bufio" + "crypto/tls" "cube/config" "cube/gologger" "net/http" @@ -42,7 +43,10 @@ func (p Phpmyadmin) CrackPortCheck() bool { func (p Phpmyadmin) Exec() CrackResult { result := CrackResult{Crack: *p.Crack, Result: false, Err: nil} - clt := http.Client{} + tr := &http.Transport{ + TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, + } + clt := http.Client{Transport: tr} if !strings.HasPrefix(p.Ip, "http") { gologger.Errorf("Invalid URL, eg: http://%s", p.Ip) } @@ -75,7 +79,8 @@ func (p Phpmyadmin) Exec() CrackResult { CheckRedirect: func(req *http.Request, via []*http.Request) error { return http.ErrUseLastResponse }, - Jar: jar} + Jar: jar, + Transport: tr} //fmt.Println(jar.Cookies(host))