mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 21:43:18 -07:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
b8d9179def
commit
30d9415d8c
5 changed files with 25 additions and 24 deletions
|
@ -7,7 +7,6 @@ import (
|
|||
"golang.org/x/net/html"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
func isTitleElement(n *html.Node) bool {
|
||||
|
@ -30,9 +29,8 @@ func searchForTitle(n *html.Node) string {
|
|||
|
||||
func httpGrabber(mod *SynScanner, ip string, port int) string {
|
||||
schema := "http"
|
||||
timeout := time.Duration(10 * time.Second)
|
||||
client := &http.Client{
|
||||
Timeout: timeout,
|
||||
Timeout: bannerGrabTimeout,
|
||||
CheckRedirect: func(req *http.Request, via []*http.Request) error {
|
||||
return nil
|
||||
},
|
||||
|
@ -42,7 +40,7 @@ func httpGrabber(mod *SynScanner, ip string, port int) string {
|
|||
if strings.Contains(sport, "443") {
|
||||
schema = "https"
|
||||
client = &http.Client{
|
||||
Timeout: timeout,
|
||||
Timeout: bannerGrabTimeout,
|
||||
Transport: &http.Transport{
|
||||
TLSClientConfig: &tls.Config{
|
||||
InsecureSkipVerify: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue