破解foxmail密码

  今天老妈把邮箱密码忘了。想到foxmail里应该有记录,就找出账号设置文件,打开看看,果然有密码,不过被加密了。google到解决办法后,用php写程序解决了。然后修改了一下,变成通用的。其实可以用看星星的程序解决。不过手边没有,再说,咱程序员自有自己的办法^_^

function hexDecode($s) {
    return preg_replace(‘/(w{2})/e’,”chr(hexdec(‘\1’))”,$s);
}

function foxmailCrack($src) {
    $s1 = substr(hexDecode($src), 1) ^ “~draGon~”;
    $s2 = chr(ord(‘Z’) ^ hexdec(substr($src, 0, 2)));
    $s2 .= substr(hexDecode($src), 1, -1);
    $out = ”;
    for($i = 0; $i < strlen($s1); $i++){
        $tmp = ord($s1[$i]) – ord($s2[$i]);
        $tmp = $tmp < 0 ? $tmp + 255 : $tmp;
        $out .= chr($tmp);
    }
    return $out;
}
?>

2 thoughts on “破解foxmail密码

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.