{"record":{"id":"eeb38d47dcc58eab","repo":"shadow1ng/fscan","slug":"fingerprint-enhanced-parse-failed","errorCode":"fingerprint_enhanced_parse_failed","errorMessage":"fingerprint_enhanced_parse_failed: %w","messagePattern":"fingerprint_enhanced_parse_failed: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"webscan/fingerprint/enhanced.go","lineNumber":61,"sourceCode":"\t} `json:\"http\"`\n}\n\n// EnhancedFingerprintDB 增强指纹数据库\ntype EnhancedFingerprintDB struct {\n\tFingerprints []*EnhancedFingerprint\n\tregexCache   sync.Map // pattern → *regexp.Regexp，无锁并发安全\n}\n\nvar (\n\tenhancedDB     *EnhancedFingerprintDB\n\tenhancedDBOnce sync.Once // 保证只初始化一次\n)\n\n// LoadEnhancedFingerprints 加载增强指纹库\nfunc LoadEnhancedFingerprints() error {\n\tvar fps []*EnhancedFingerprint\n\tif err := json.Unmarshal(fingerprintHubData, &fps); err != nil {\n\t\treturn fmt.Errorf(\"%s: %w\", i18n.GetText(\"fingerprint_enhanced_parse_failed\"), err)\n\t}\n\n\t// 预处理：CaseInsensitive 的 matcher 预先小写化 Words，避免匹配时重复分配\n\tfor _, fp := range fps {\n\t\tfor hi := range fp.HTTP {\n\t\t\tfor mi := range fp.HTTP[hi].Matchers {\n\t\t\t\tm := &fp.HTTP[hi].Matchers[mi]\n\t\t\t\tif m.CaseInsensitive && m.Type == \"word\" {\n\t\t\t\t\tfor wi, w := range m.Words {\n\t\t\t\t\t\tm.Words[wi] = strings.ToLower(w)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tenhancedDB = &EnhancedFingerprintDB{\n\t\tFingerprints: fps,","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/webscan/fingerprint/enhanced.go#L43-L79","documentation":"Guard in LoadEnhancedFingerprints: json.Unmarshal of the embedded fingerprint-hub data into []*EnhancedFingerprint failed. The bundled fingerprint database is malformed or structurally incompatible with the struct definitions, so the enhanced fingerprint engine cannot initialize.","triggerScenarios":"Thrown at webscan/fingerprint/enhanced.go:61 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Validate the embedded fingerprint JSON against the EnhancedFingerprint schema","Update struct tags to match the upstream fingerprint-hub format","Re-embed a known-good copy of the fingerprint data"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"95cc12e753bf43de7004e5aef42a9ffba3934303","analyzedAt":"2026-09-06T17:07:30.094Z","contentChangedAt":"2026-09-06T17:07:30.094Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}