是否有任何可能或简单的方法来解密这部分加密?
$mixpw .= chr((int) ((sqrt( (ord($_POST['passwd'][$i]) << 2) * 974169 * (ord($_POST['passwd'][$i]))) >> 1) / (314.33 * 3.14)) + 2.12);
由于按位移位,对我来说这似乎太复杂了。
这是加密的完整代码:
$mixpw = '';
$curM = 0;
for($i = 0; $i < strlen($_POST['passwd']); $i++) {
if($curM == 0) {
$mixpw .= ($i+2 < strlen($_POST['passwd'])) ? $_POST['passwd'][$i+2] : $_POST['passwd'][$i];
} else if($curM == 1) {
$mixpw .= chr((0x46+$i) % 254) . $_POST['passwd'][$i];
} else if($curM == 2) {
$mixpw .= ucfirst($_POST['passwd'][$i-2]);
} else if($curM == 3) {
$mixpw .= chr((int) ((sqrt( (ord($_POST['passwd'][$i]) << 2) * 974169 * (ord($_POST['passwd'][$i]))) >> 1) / (314.33 * 3.14)) + 2.12);
}
$curM = ($curM+1 > 3) ? 0 : $curM+1;
}
加密密码为:CG3ST3KT
我设法获得了原始密码的前 3 个字母:s3C