From a2a779f512fc02984a909f359b644154b8855d64 Mon Sep 17 00:00:00 2001 From: zhzyker Date: Mon, 13 Jun 2022 20:15:00 +0800 Subject: [PATCH] [0.4] Modify json result refer to https://github.com/zhzyker/dismap/issues/19 and fix telnet --- configs/config.go | 2 +- configs/rule.go | 4 +- internal/output/output.go | 57 +++++++++----- internal/output/output_json.go | 49 ------------ internal/protocol/discover.go | 103 +------------------------- internal/protocol/judge/tcp_telnet.go | 7 +- 6 files changed, 50 insertions(+), 172 deletions(-) delete mode 100644 internal/output/output_json.go diff --git a/configs/config.go b/configs/config.go index c6d6ece..824c66e 100644 --- a/configs/config.go +++ b/configs/config.go @@ -1,6 +1,6 @@ package configs -var DefaultPorts = []int{21, 22, 23, 25, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 110, 135, 137, 138, 139, 143, 389, 443, 445, 587, 631, 800, 801, 808, 880, 888, 1000, 1024, 1025, 1080, 1099, 1389, 1433, 1521, 3306, 3307, 3388, 3389, 3443, 5800, 5900, 6379, 7000, 7001, 7007, 7010, 7788, 8000, 8001, 8002, 8003, 8004, 8005, 8006, 8007, 8008, 8009, 8010, 8011, 8030, 8060, 8070, 8080, 8081, 8082, 8083, 8084, 8085, 8086, 8087, 8088, 8089, 8090, 8091, 8092, 8093, 8094, 8095, 8096, 8097, 8098, 8099, 8161, 8175, 8188, 8189, 8443, 8445, 8448, 8554, 8800, 8848, 8880, 8881, 8888, 8899, 8983, 8989, 9000, 9001, 9002, 9008, 9010, 9043, 9060, 9080, 9081, 9082, 9083, 9084, 9085, 9086, 9087, 9088, 9089, 9090, 9091, 9092, 9093, 9094, 9095, 9096, 9097, 9099, 9443, 9600, 9628, 9800, 9999, 11001, 13443, 49155, 50050, 61616} +var DefaultPorts = []int{21, 22, 23, 25, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 110, 135, 137, 138, 139, 143, 389, 443, 445, 587, 631, 800, 801, 808, 880, 888, 1000, 1024, 1025, 1080, 1099, 1389, 1433, 1521, 2383, 3306, 3307, 3388, 3389, 3443, 5000, 5357, 5560, 5800, 5900, 6379, 7000, 7001, 7007, 7010, 7788, 8000, 8001, 8002, 8003, 8004, 8005, 8006, 8007, 8008, 8009, 8010, 8011, 8030, 8060, 8070, 8080, 8081, 8082, 8083, 8084, 8085, 8086, 8087, 8088, 8089, 8090, 8091, 8092, 8093, 8094, 8095, 8096, 8097, 8098, 8099, 8161, 8175, 8188, 8189, 8200, 8443, 8445, 8448, 8554, 8800, 8848, 8880, 8881, 8888, 8899, 8983, 8989, 9000, 9001, 9002, 9008, 9010, 9043, 9060, 9080, 9081, 9082, 9083, 9084, 9085, 9086, 9087, 9088, 9089, 9090, 9091, 9092, 9093, 9094, 9095, 9096, 9097, 9099, 9443, 9600, 9628, 9800, 9999, 11001, 13443, 49155, 50050, 61616} var DefaultHeader = map[string]string{ "Accept-Language": "zh,zh-TW;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6", diff --git a/configs/rule.go b/configs/rule.go index 252d737..29ea3c1 100644 --- a/configs/rule.go +++ b/configs/rule.go @@ -1076,6 +1076,7 @@ var RuleData = []RuleLab{ {1, "Destoon", "body", "", InStr{"(content=\"destoon|destoon_moduleid)", "", ""}, ReqHttp{"", "", nil, ""}}, {1, "Devaldi-FlexPaper", "body", "", InStr{"(login to the flexpaper console|href=\"http://flexpaper.devaldi.com/plugins.htm\")", "", ""}, ReqHttp{"", "", nil, ""}}, {1, "devolo-dLAN-WIFI", "body", "", InStr{"(href=\"customization.css\")", "", ""}, ReqHttp{"", "", nil, ""}}, + {3, "Dreamer-CMS", "header", "", InStr{"", "(dreamer-cms-(.*)=)", ""}, ReqHttp{"", "", nil, ""}}, {1, "DFE-SCADA", "body", "", InStr{"(scada|536870912)", "", ""}, ReqHttp{"", "", nil, ""}}, {1, "DHC-OA", "body", "", InStr{"(src=\"/extcomponent/security/image/dhc.png\")", "", ""}, ReqHttp{"", "", nil, ""}}, {1, "Diagrams", "body", "", InStr{"()", "", ""}, ReqHttp{"", "", nil, ""}}, @@ -4440,6 +4441,7 @@ var RuleData = []RuleLab{ {1, "YMail-Optical-Content-Reading", "body", "", InStr{"(/ymail/default/js/menu.js)", "", ""}, ReqHttp{"", "", nil, ""}}, {1, "Ymhome-OA", "body", "", InStr{"(/yimioa.apk)", "", ""}, ReqHttp{"", "", nil, ""}}, {1, "Yongyou-ism", "body", "", InStr{"(sheight*window.screen.deviceydpi)", "", ""}, ReqHttp{"", "", nil, ""}}, + {3, "Yonyou-NC", "body", "", InStr{"(url=nccloud)", "", ""}, ReqHttp{"", "", nil, ""}}, {3, "Yonyou-ERP", "body", "", InStr{"(login_main_bg|login_owner)", "", ""}, ReqHttp{"", "", nil, ""}}, {3, "Yonyou-ERP-NC", "body", "", InStr{"(/nc/servlet/nc.ui.iufo.login.index)", "", ""}, ReqHttp{"", "", nil, ""}}, {3, "Yonyou-GRP-U8", "body", "", InStr{"(window.location.replace(\"login.jsp?up=1\"))", "", ""}, ReqHttp{"", "", nil, ""}}, @@ -4454,7 +4456,7 @@ var RuleData = []RuleLab{ {3, "Yonyou-U8-cloud", "body", "", InStr{"(开启u8 cloud云端之旅)", "", ""}, ReqHttp{"", "", nil, ""}}, {1, "Yonyou-Uclient", "body", "", InStr{"(http-equiv=refresh content=0;url=index.jsp)", "", ""}, ReqHttp{"", "", nil, ""}}, {1, "Yonyou-UFIDA", "body", "", InStr{"(/system/login/login.asp?appid=)", "", ""}, ReqHttp{"", "", nil, ""}}, - {1, "Yonyou-UFIDA-NC", "body", "", InStr{"(ufida|logo/images/|logo/images/ufida_nc.png|
|
|