更新指纹,修改poc的bug

This commit is contained in:
shadow1ng
2021-06-30 16:26:17 +08:00
parent 1437ac60ff
commit d38e38e17a
4 changed files with 37 additions and 27 deletions
+12 -11
View File
@@ -14,27 +14,28 @@ var Pocs embed.FS
func WebScan(info *common.HostInfo) {
var pocinfo = common.Pocinfo
buf := strings.Split(info.Url,"/")
pocinfo.Target = strings.Join(buf[:3],"/")
for _,infostr := range info.Infostr {
buf := strings.Split(info.Url, "/")
pocinfo.Target = strings.Join(buf[:3], "/")
if pocinfo.PocName != "" {
Execute(pocinfo)
return
}
for _, infostr := range info.Infostr {
pocinfo.PocName = lib.CheckInfoPoc(infostr)
err := Execute(pocinfo)
if err != nil {
errlog := fmt.Sprintf("[-] webtitle %v %v", info.Url, err)
common.LogError(errlog)
}
Execute(pocinfo)
}
}
func Execute(PocInfo common.PocInfo) error {
func Execute(PocInfo common.PocInfo) {
req, err := http.NewRequest("GET", PocInfo.Target, nil)
if err != nil {
return err
errlog := fmt.Sprintf("[-] webtitle %v %v", PocInfo.Target, err)
common.LogError(errlog)
return
}
req.Header.Set("User-agent", "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36")
if PocInfo.Cookie != "" {
req.Header.Set("Cookie", PocInfo.Cookie)
}
lib.CheckMultiPoc(req, Pocs, PocInfo.Num, PocInfo.PocName)
return nil
}