MCPcopy Create free account
hub / github.com/R4gd0ll/LazyAnFuZai / portCheck

Method portCheck

src/main/java/System/systemCheck.java:13–42  ·  view source on GitHub ↗
(String a)

Source from the content-addressed store, hash-verified

11 return result;
12 }
13 public static String portCheck(String a){
14 String[] b = a.split("\n");
15 String result = "netstat查看开放端口,";
16 if(b.length == 0 ) {
17 result += "没有开放高危端口。";
18 return result;
19 }else{
20 result += "开放";
21 }
22 for(String i : b){
23 if(i.contains("22")){
24 result += "22、";
25 }else if(i.contains("135")){
26 result += "135、";
27 }else if(i.contains("137")){
28 result += "137、";
29 }else if(i.contains("138")){
30 result += "138、";
31 }else if(i.contains("139")){
32 result += "139、";
33 }else if(i.contains("445")){
34 result += "445、";
35 }else if(i.contains("3389")){
36 result += "3389、";
37 }
38 }
39 result += "共"+b.length+"个高危端口,不符合安全要求";
40
41 return result;
42 }
43 public static String killCheck(){
44 String result = "未发现常用杀毒软件,不符合安全要求";
45 return result;

Callers 1

resultPrintMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected