文件名称:java弱口令代码java弱口令代码
文件大小:3KB
文件格式:RAR
更新时间:2013-11-08 14:01:45
java资料
public class JJL2 { public static void main(String[] args) { System.out.println(new JJL2().checkPassword("123sdhgh*/-/*")); } private boolean checkPassword(String password) { int numberCount = 0; int letterCount = 0; int otherCount = 0; for (int i = 0; i < password.length(); i++) { char temp = password.charAt(i); if (temp >= 48 && temp <= 57) { numberCount++; }else if((temp >= 65 && temp <= 90) || (temp >= 97 && temp <= 122)){ letterCount++; }else{ otherCount++; } if (numberCount > 0 && letterCount > 0 && otherCount > 0) { return true; } } return false; } }
【文件预览】:
新建 java 文档.doc