簡體   English   中英

PHP-解密加密密碼

[英]PHP - decrypt encrypted password

有沒有可能或簡單的方法來解密加密的這一部分?

$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

我想出了一個解決方案! 前三個加密並不難解密。
但是要解決第四個問題,我只是復制了加密代碼,並嘗試猜測前三個之后的一些字符。 在您獲得正確的加密之前,猜測時間不會太長。
最終,此加密的密碼是s3CReT

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM