人民的名义-抓捕赵德汉1-200
CheckInterface.class文件,定义CheckInterface类里的checkPassword
package defpackage;
/* renamed from: CheckInterface reason: default package */
public interface CheckInterface {
boolean checkPassword(String str);
}
CheckPassword.class文件,找到了密码输入错误的提示:Incorrect password
if判断句中通过checkerObject.checkPassword
来判断密码是否输入正确
public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, IOException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException {
CheckInterface checkerObject = loadCheckerObject();
BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
while (true) {
System.out.println("Enter password:");
if (checkerObject.checkPassword(stdin.readLine())) {
System.out.println("Well done, that is the correct password");
System.exit(0);
} else {
System.out.println("Incorrect password");
}
}
}
newClassName.class文件,找到了checkPassword
具体代码,很明显是将密码MD5加密后与字符串fa3733c647dca53a66cf8df953c2d539
进行比较
/* renamed from: CheckPass reason: default package */
public class CheckPass implements CheckInterface {
public boolean checkPassword(String input) {
MessageDigest md5Obj = null;
try {
md5Obj = MessageDigest.getInstance("MD5");
} catch (NoSuchAlgorithmException e) {
System.out.println("Hash Algorithm not supported");
System.exit(-1);
}
byte[] bArr = new byte[40];
md5Obj.update(input.getBytes(), 0, input.length());
return byteArrayToHexString(md5Obj.digest()).equals("fa3733c647dca53a66cf8df953c2d539");
得到flag:monkey99