mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-26 21:21:53 +08:00
feat: 统一服务缓存 + 指纹驱动插件匹配
将 webServiceCache 扩展为通用 serviceCache,所有指纹识别结果 统一缓存,插件匹配时端口不命中则回退到服务名称匹配。 删除多余的 service_cache.go,复用已有的 ServiceInfo 体系。 补充 nil 防御、Explicit 标记、大量单元/集成/回归测试。
This commit is contained in:
+2
-3
@@ -707,8 +707,8 @@ func processServiceResult(ctx context.Context, host string, port int, addr strin
|
||||
return
|
||||
}
|
||||
|
||||
// 缓存服务名称,供插件按服务类型匹配(解决非标准端口问题)
|
||||
MarkServiceName(host, port, serviceInfo.Name)
|
||||
// 缓存指纹识别结果,供插件按服务类型匹配(解决非标准端口问题)
|
||||
CacheServiceInfo(host, port, serviceInfo)
|
||||
|
||||
// 保存并输出服务信息
|
||||
details := buildServiceDetails(port, serviceInfo)
|
||||
@@ -716,7 +716,6 @@ func processServiceResult(ctx context.Context, host string, port int, addr strin
|
||||
|
||||
if isWeb {
|
||||
details["is_web"] = true
|
||||
MarkAsWebService(host, port, serviceInfo)
|
||||
}
|
||||
|
||||
_ = session.SaveResult(&output.ScanResult{
|
||||
|
||||
Reference in New Issue
Block a user