mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-23 11:41:53 +08:00
更新指纹,修改poc的bug
This commit is contained in:
+12
-11
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user