mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-24 20:21:52 +08:00
feat: 统一服务缓存 + 指纹驱动插件匹配
将 webServiceCache 扩展为通用 serviceCache,所有指纹识别结果 统一缓存,插件匹配时端口不命中则回退到服务名称匹配。 删除多余的 service_cache.go,复用已有的 ServiceInfo 体系。 补充 nil 防御、Explicit 标记、大量单元/集成/回归测试。
This commit is contained in:
@@ -134,6 +134,26 @@ func TestBuildTargetURL(t *testing.T) {
|
||||
expected: "http://[2001:db8::1]:443",
|
||||
expectError: false,
|
||||
},
|
||||
{
|
||||
name: "bare ipv6 url without protocol gets brackets",
|
||||
hostInfo: &common.HostInfo{
|
||||
Host: "2001:db8::1",
|
||||
Port: 80,
|
||||
URL: "2001:db8::1/admin",
|
||||
},
|
||||
expected: "http://[2001:db8::1]",
|
||||
expectError: false,
|
||||
},
|
||||
{
|
||||
name: "bare ipv6 url with protocol gets brackets",
|
||||
hostInfo: &common.HostInfo{
|
||||
Host: "2001:db8::1",
|
||||
Port: 80,
|
||||
URL: "http://2001:db8::1/admin",
|
||||
},
|
||||
expected: "http://[2001:db8::1]",
|
||||
expectError: false,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
|
||||
Reference in New Issue
Block a user