From d62bbdf5df0de627ac760e2b7c3ede00ed5fcf2b Mon Sep 17 00:00:00 2001 From: M09Ic Date: Sun, 19 Feb 2023 22:27:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=8C=87=E7=BA=B9=E6=94=B6?= =?UTF-8?q?=E9=9B=86=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/baseline.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/baseline.go b/pkg/baseline.go index 1e825ab..8c8b4ec 100644 --- a/pkg/baseline.go +++ b/pkg/baseline.go @@ -120,7 +120,11 @@ func (bl *Baseline) IsDir() bool { // Collect 深度收集信息 func (bl *Baseline) Collect() { - bl.Frameworks = FingerDetect(string(bl.Raw)) + if bl.ContentType == "html" || bl.ContentType == "json" || bl.ContentType == "txt" { + // 指纹库设计的时候没考虑js,css文件的指纹, 跳过非必要的指纹收集减少误报提高性能 + bl.Frameworks = FingerDetect(string(bl.Raw)) + } + if len(bl.Body) > 0 { if bl.ContentType == "html" { bl.Title = iutils.AsciiEncode(parsers.MatchTitle(string(bl.Body)))