mirror of
https://github.com/chainreactors/spray.git
synced 2026-10-29 11:50:52 +00:00
- FingerEngine nil 检查防止未初始化时 panic (baseline.go, fingers.go) - 日志/颜色/指纹引擎/Extractor 注册增加状态检查, 防止 SDK 多次调用时重复设置 Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
24 lines
486 B
Go
24 lines
486 B
Go
package pkg
|
|
|
|
import (
|
|
"bytes"
|
|
"github.com/chainreactors/fingers/common"
|
|
)
|
|
|
|
// gogo fingers engine
|
|
func FingersDetect(content []byte) common.Frameworks {
|
|
if FingerEngine == nil || FingerEngine.Fingers() == nil {
|
|
return nil
|
|
}
|
|
frames, _ := FingerEngine.Fingers().HTTPMatch(bytes.ToLower(content), "")
|
|
return frames
|
|
}
|
|
|
|
func EngineDetect(content []byte) common.Frameworks {
|
|
if FingerEngine == nil {
|
|
return nil
|
|
}
|
|
frames, _ := FingerEngine.DetectContent(content)
|
|
return frames
|
|
}
|