php散列函数比较:
md5(‘240610708‘) == md5(‘QNKCDZO‘); md5(‘aabg7XSs‘) == md5(‘aabC9RqS‘); sha1(‘aaroZmOk‘) == sha1(‘aaK1STfY‘); sha1(‘aaO8zKZF‘) == sha1(‘aa3OFF9m‘); ‘0010e2‘ == ‘1e3‘; ‘0x1234Ab‘ == ‘1193131‘; ‘0xABCdef‘ == ‘ 0xABCdef‘;
php逻辑绕过:
<?php $test=$_GET[‘test‘]; $test=md5($test); if($test==‘0‘) { print "True!"; } else print "False!" ?>
比如:http://localhost/ctf.php?test=240610708
MD5 ("240610708") = 0e462097431906509019562988736854 MD5 ("QNKCDZO") = 0e830400451993494058024219903391 二者的计算结果均为0exxx,换成数字就是0*10的n次方(永远为0) 所以二者的结果换成数字都是0,所以相等。
时间: 2024-10-07 03:54:57