mirror of
https://github.com/chainreactors/spray.git
synced 2026-10-28 19:40:49 +00:00
adapt fingers
This commit is contained in:
1 parent
9016bcd4d3
commit
0374bb5122
7 files changed
+25
-13
No files matched your search
+7
-7
@@ -135,8 +135,15 @@ func (bl *Baseline) IsDir() bool {
|
||||
|
||||
// Collect 深度收集信息
|
||||
func (bl *Baseline) Collect() {
|
||||
if bl.Collected { // 防止重复收集
|
||||
return
|
||||
} else {
|
||||
bl.Collected = true
|
||||
}
|
||||
|
||||
if bl.ContentType == "html" || bl.ContentType == "json" || bl.ContentType == "txt" {
|
||||
// 指纹库设计的时候没考虑js,css文件的指纹, 跳过非必要的指纹收集减少误报提高性能
|
||||
//fmt.Println(bl.Source, bl.Url.String()+bl.Path, bl.RedirectURL, "call fingersengine")
|
||||
if EnableAllFingerEngine {
|
||||
bl.Frameworks = EngineDetect(bl.Raw)
|
||||
} else {
|
||||
@@ -160,13 +167,6 @@ func (bl *Baseline) Collect() {
|
||||
}
|
||||
|
||||
func (bl *Baseline) CollectURL() {
|
||||
if bl.Collected {
|
||||
// 防止重复收集
|
||||
return
|
||||
} else {
|
||||
bl.Collected = true
|
||||
}
|
||||
|
||||
if len(bl.Body) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
// gogo fingers engine
|
||||
func FingersDetect(content []byte) common.Frameworks {
|
||||
frames, _ := FingerEngine.FingersEngine.HTTPMatch(bytes.ToLower(content), "")
|
||||
frames, _ := FingerEngine.Fingers().HTTPMatch(bytes.ToLower(content), "")
|
||||
return frames
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -26,14 +26,14 @@ func LoadTemplates() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, f := range FingerEngine.FingersEngine.HTTPFingers {
|
||||
for _, f := range FingerEngine.Fingers().HTTPFingers {
|
||||
for _, rule := range f.Rules {
|
||||
if rule.SendDataStr != "" {
|
||||
ActivePath = append(ActivePath, rule.SendDataStr)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, f := range FingerEngine.FingerPrintEngine.FingerPrints {
|
||||
for _, f := range FingerEngine.FingerPrintHub().FingerPrints {
|
||||
if f.Path != "/" {
|
||||
ActivePath = append(ActivePath, f.Path)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user