mirror of
https://github.com/chainreactors/spray.git
synced 2025-09-15 11:40:13 +00:00
adapt all finger engine
This commit is contained in:
parent
7ac545e0ae
commit
3e63812ab0
@ -137,10 +137,10 @@ func (bl *Baseline) IsDir() bool {
|
||||
func (bl *Baseline) Collect() {
|
||||
if bl.ContentType == "html" || bl.ContentType == "json" || bl.ContentType == "txt" {
|
||||
// 指纹库设计的时候没考虑js,css文件的指纹, 跳过非必要的指纹收集减少误报提高性能
|
||||
bl.Frameworks = FingersDetect(bl.Raw)
|
||||
if EnableAllFingerEngine {
|
||||
bl.Frameworks.Merge(FingerPrintHubDetect(bl.Response.Header, string(bl.Body)))
|
||||
bl.Frameworks.Merge(WappalyzerDetect(bl.Response.Header, bl.Body))
|
||||
bl.Frameworks = EngineDetect(bl.Raw)
|
||||
} else {
|
||||
bl.Frameworks = FingersDetect(bl.Raw)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,6 @@ package pkg
|
||||
import (
|
||||
"bytes"
|
||||
"github.com/chainreactors/fingers/common"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// gogo fingers engine
|
||||
@ -12,12 +11,7 @@ func FingersDetect(content []byte) common.Frameworks {
|
||||
return frames
|
||||
}
|
||||
|
||||
func FingerPrintHubDetect(header http.Header, body string) common.Frameworks {
|
||||
frames := FingerEngine.FingerPrintEngine.Match(header, body)
|
||||
return frames
|
||||
}
|
||||
|
||||
func WappalyzerDetect(header http.Header, body []byte) common.Frameworks {
|
||||
frames := FingerEngine.WappalyzerEngine.Fingerprint(header, body)
|
||||
func EngineDetect(content []byte) common.Frameworks {
|
||||
frames, _ := FingerEngine.DetectContent(content)
|
||||
return frames
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit d4db8ffbae6f0d52b18fea2bcabe7b2c29c2153d
|
||||
Subproject commit f1150d00253e0c888976dbfe55cf2669c51f0b58
|
Loading…
x
Reference in New Issue
Block a user