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