mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-22 03:10:42 +08:00
fix: resolve recent service scan regressions
This commit is contained in:
@@ -88,8 +88,8 @@ func TestCacheServiceInfo_BasicCRUD(t *testing.T) {
|
||||
func TestWebServiceFiltering(t *testing.T) {
|
||||
clearServiceCache()
|
||||
|
||||
webNames := []string{"http", "https", "ssl", "tls", "nginx", "apache", "iis", "tomcat"}
|
||||
nonWebNames := []string{"ssh", "mysql", "postgresql", "redis", "mongodb", "ftp", "smtp", "telnet", "vnc", "rdp"}
|
||||
webNames := []string{"http", "https", "nginx", "apache", "iis", "tomcat"}
|
||||
nonWebNames := []string{"ssl", "tls", "ssh", "mysql", "postgresql", "redis", "mongodb", "ftp", "smtp", "telnet", "vnc", "rdp"}
|
||||
|
||||
for _, name := range webNames {
|
||||
clearServiceCache()
|
||||
|
||||
+1
-2
@@ -222,7 +222,7 @@ var (
|
||||
"telnet", "ftp", "smtp", "pop3", "imap", "ldap", "snmp", "vnc", "rdp", "smb",
|
||||
}
|
||||
webKeywords = []string{
|
||||
"http", "https", "ssl", "tls", "nginx", "apache", "iis", "tomcat",
|
||||
"http", "https", "nginx", "apache", "iis", "tomcat",
|
||||
"jetty", "nodejs", "php", "asp", "jsp",
|
||||
}
|
||||
bannerKeywords = []string{"server:", "http/", "content-type:"}
|
||||
@@ -514,4 +514,3 @@ func hasMalformedURLPort(host string) bool {
|
||||
}
|
||||
return strings.Contains(host, ":")
|
||||
}
|
||||
|
||||
|
||||
@@ -230,11 +230,11 @@ func TestIsWebServiceByFingerprint(t *testing.T) {
|
||||
expected: true,
|
||||
},
|
||||
{
|
||||
name: "SSL/TLS服务",
|
||||
name: "通用TLS服务不是Web",
|
||||
serviceInfo: &ServiceInfo{
|
||||
Name: "ssl",
|
||||
},
|
||||
expected: true,
|
||||
expected: false,
|
||||
},
|
||||
{
|
||||
name: "包含非Web关键字-postgresql",
|
||||
|
||||
Reference in New Issue
Block a user