更新指纹、优化内存占用

This commit is contained in:
影舞者 2021-09-10 21:07:50 +08:00
parent d5665f03d6
commit 297aba6c4f

View File

@ -138,7 +138,7 @@ func geturl(info *common.HostInfo, flag int, CheckData []WebScan.CheckDatas) (er
var text []byte
body, err := getRespBody(resp)
if err != nil {
return err, "", CheckData
return err, "https", CheckData
}
if flag != 2 {
re := regexp.MustCompile("(?ims)<title>(.*)</title>")
@ -181,7 +181,7 @@ func geturl(info *common.HostInfo, flag int, CheckData []WebScan.CheckDatas) (er
if detectorstr != nil {
encode2 = detectorstr.Charset
}
if encode == "gbk" || encode == "gb2312" || strings.Contains(strings.ToLower(encode2), "gb") {
if encode == "gbk" || encode == "gb2312" || strings.Contains(strings.ToLower(encode2), "gb") {
titleGBK, err := Decodegbk(text)
if err == nil {
title = string(titleGBK)