Android reverse 人民的名义-抓捕赵德汉1-200

人民的名义-抓捕赵德汉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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值