mirror of
https://github.com/shadow1ng/fscan.git
synced 2025-09-14 14:06:44 +08:00
取消webscan模块60s超时,减少漏报
This commit is contained in:
parent
9527fcf0c7
commit
d1ff89676d
@ -7,7 +7,6 @@ import (
|
|||||||
"github.com/shadow1ng/fscan/common"
|
"github.com/shadow1ng/fscan/common"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:embed pocs
|
//go:embed pocs
|
||||||
@ -18,27 +17,12 @@ func WebScan(info *common.HostInfo) {
|
|||||||
buf := strings.Split(info.Url, "/")
|
buf := strings.Split(info.Url, "/")
|
||||||
pocinfo.Target = strings.Join(buf[:3], "/")
|
pocinfo.Target = strings.Join(buf[:3], "/")
|
||||||
|
|
||||||
var flag bool
|
if pocinfo.PocName != "" {
|
||||||
go func() {
|
Execute(pocinfo)
|
||||||
time.Sleep(60 * time.Second)
|
} else {
|
||||||
flag = true
|
for _, infostr := range info.Infostr {
|
||||||
}()
|
pocinfo.PocName = lib.CheckInfoPoc(infostr)
|
||||||
|
|
||||||
go func() {
|
|
||||||
if pocinfo.PocName != "" {
|
|
||||||
Execute(pocinfo)
|
Execute(pocinfo)
|
||||||
} else {
|
|
||||||
for _, infostr := range info.Infostr {
|
|
||||||
pocinfo.PocName = lib.CheckInfoPoc(infostr)
|
|
||||||
Execute(pocinfo)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
flag = true
|
|
||||||
}()
|
|
||||||
|
|
||||||
for {
|
|
||||||
if flag {
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -46,7 +30,7 @@ func WebScan(info *common.HostInfo) {
|
|||||||
func Execute(PocInfo common.PocInfo) {
|
func Execute(PocInfo common.PocInfo) {
|
||||||
req, err := http.NewRequest("GET", PocInfo.Target, nil)
|
req, err := http.NewRequest("GET", PocInfo.Target, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errlog := fmt.Sprintf("[-] webtitle %v %v", PocInfo.Target, err)
|
errlog := fmt.Sprintf("[-] webpocinit %v %v", PocInfo.Target, err)
|
||||||
common.LogError(errlog)
|
common.LogError(errlog)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -591,7 +591,7 @@ func getRespBody(oResp *http.Response) ([]byte, error) {
|
|||||||
body = append(body, buf...)
|
body = append(body, buf...)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
raw, err := ioutil.ReadAll(io.LimitReader(oResp.Body, int64(3<<20)))
|
raw, err := ioutil.ReadAll(oResp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user