From 3811f3219eec277968bfec5bb6fc3f60c347e275 Mon Sep 17 00:00:00 2001 From: Jess Frazelle Date: Fri, 6 Jul 2018 10:10:20 -0400 Subject: [PATCH] fix Signed-off-by: Jess Frazelle --- k8scan/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/k8scan/main.go b/k8scan/main.go index 1290800..48d8c72 100644 --- a/k8scan/main.go +++ b/k8scan/main.go @@ -147,8 +147,9 @@ func isKubernetesDashboard(ip string, port int) bool { } body := strings.ToLower(string(b)) - if (strings.Contains(body, "kubernetes") && strings.Contains(body, "pod")) || - (strings.Contains(body, "versions") && strings.Contains(body, "serverAddress")) { + if (strings.Contains(body, "kubernetes") && strings.Contains(body, "dashboard")) || + (strings.Contains(body, `"versions"`) && strings.Contains(body, `"serverAddress`)) || + (strings.Contains(body, `"paths"`) && strings.Contains(body, `"/api"`)) { logrus.Infof("uri: %s", uri) return true }