From 8a788427b715f8d64edaf44675fa1ffd7833dd01 Mon Sep 17 00:00:00 2001 From: xiaobo Date: Mon, 26 Jun 2023 18:15:09 +0800 Subject: [PATCH] fix: add field names to struct literal --- Plugins/webtitle.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Plugins/webtitle.go b/Plugins/webtitle.go index 20b1b87..1c78ea0 100644 --- a/Plugins/webtitle.go +++ b/Plugins/webtitle.go @@ -4,10 +4,6 @@ import ( "compress/gzip" "crypto/tls" "fmt" - "github.com/shadow1ng/fscan/WebScan" - "github.com/shadow1ng/fscan/WebScan/lib" - "github.com/shadow1ng/fscan/common" - "golang.org/x/text/encoding/simplifiedchinese" "io" "io/ioutil" "net/http" @@ -16,6 +12,11 @@ import ( "strings" "time" "unicode/utf8" + + "github.com/shadow1ng/fscan/WebScan" + "github.com/shadow1ng/fscan/WebScan/lib" + "github.com/shadow1ng/fscan/common" + "golang.org/x/text/encoding/simplifiedchinese" ) func WebTitle(info *common.HostInfo) error { @@ -140,7 +141,7 @@ func geturl(info *common.HostInfo, flag int, CheckData []WebScan.CheckDatas) (er if !utf8.Valid(body) { body, _ = simplifiedchinese.GBK.NewDecoder().Bytes(body) } - CheckData = append(CheckData, WebScan.CheckDatas{body, fmt.Sprintf("%s", resp.Header)}) + CheckData = append(CheckData, WebScan.CheckDatas{Body: body, Headers: fmt.Sprintf("%s", resp.Header)}) var reurl string if flag != 2 { title = gettitle(body)