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

Method passCheck

src/main/java/System/passCheck.java:4–23  ·  view source on GitHub ↗
(String a)

Source from the content-addressed store, hash-verified

2
3public class passCheck {
4 public static String passCheck(String a) {
5 String result = "查看/etc/pam.d/system-auth密码复杂度";
6 String[] b = {"ucredit=","lcredit=","minlen=","dcredit=","retry=","ocredit="};
7 String[] c = a.split("\\s+");
8 int flag = 0;
9 for(String d : c){
10 if(d.contains("=")){
11 for(String e : b){
12 if(d.contains(e)){
13 result = result + checkpassword(d)[0];
14 flag = flag + Integer.parseInt(checkpassword(d)[1]);
15 }
16 }
17 }
18 }
19 if(flag<3){
20 result = result + "不符合安全要求";
21 }
22 return result;
23 }
24
25 public static String[] checkpassword(String flag){
26 String[] res = new String[2];

Callers 1

resultPrintMethod · 0.80

Calls 1

checkpasswordMethod · 0.95

Tested by

no test coverage detected