ctf 抓捕赵德汉_陕西省网络空间安全技术大赛Mobile(四)--人民的名义抓捕赵德汉1...

本帖最后由 Enigma_G 于 2017-5-2 22:40 编辑

0x00 闲言碎语

这位朋友 @挥汗如雨  说让我写第四题,他写第五题,看了下题挺简单就答应了。。。我就简单分析下这题

题目链接  http://pan.baidu.com/s/1sljl0vz

0x01 解题

[Java] 纯文本查看 复制代码public static void main(final String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, IOException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException {

final CheckInterface checkerObject = loadCheckerObject();

final BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));

while (true) {

System.out.println("Enter password:");

final String line = stdin.readLine();

if (checkerObject.checkPassword(line)) {

System.out.println("Well done, that is the correct password");

System.exit(0);

}

else {

System.out.println("Incorrect password");

}

}

调用了checkPassword

[Java] 纯文本查看 复制代码public boolean checkPassword(final String input) {

MessageDigest md5Obj = null;

try {

md5Obj = MessageDigest.getInstance("MD5");

}

catch (NoSuchAlgorithmException e) {

System.out.println("Hash Algorithm not supported");

System.exit(-1);

}

byte[] hashBytes = new byte[40];

md5Obj.update(input.getBytes(), 0, input.length());

hashBytes = md5Obj.digest();

return byteArrayToHexString(hashBytes).equals("fa3733c647dca53a66cf8df953c2d539");

}

那么就把“fa3733c647dca53a66cf8df953c2d539"MD5解密一下

1.png (45.83 KB, 下载次数: 6)

2017-5-2 21:37 上传

好啦,看好执行的逻辑,这道题就是秒破

0x02 结语

好了,继续看书,下面开始你的表演  @挥汗如雨

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值