国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > PHP > 正文

神盾解密工具之解密 PHP神盾解密工具

2020-03-22 19:34:46
字體:
供稿:網(wǎng)友
  • 不知道某君刪了我的評論,還是發(fā)在這里面。

    其實對神盾解密并沒有那么感興趣,只是看到了博主把工具又加密了,感覺不爽。研究了一下,其實解密沒那么復(fù)雜。

    利用php_apd擴展很輕松地就這把這搞定了。只有四句代碼。

    <?phprename_function('gzuncompress','new_gzuncompress');override_function('gzuncompress', '$arg', 'print(new_gzuncompress($arg)); return new_gzuncompress($arg);');require_once 'decryption.php';decryption('decryption.php');

    該工具的核心代碼:

    <?phpfunction decryption($fileName) {    /**     * 解碼函數(shù)     * @param  string $str 待解碼字符串     * @param  string $flg 是否解析后解碼     * @return string      已解碼字符串     */    function decode($str, $flg = '') {        if($flg === '') {            $ret = $str;        } else {            $ret = '?'; $i = 0; $l = strlen($str);            while($i++ < $l) {                $c = ord($str[$i-1]);                $ret .= $c<245 ? ( $c>136 ? chr($c/2) : $str[$i-1] ) : "";            }        }        return base64_decode($ret);    }        $err = '解碼遇到錯誤,請聯(lián)系教主處理該文件!';    $str = file_get_contents($fileName);    $path = pathinfo($fileName);    $dirname = $path['dirname']; // 文件所在目錄    $baseName = $path['filename']; // 文件名            if (preg_match('|IN_DECODE_(/w{32})|s', $str, $arr)) {        // 防止解密自己,其實方法都已經(jīng)告訴你了,自己動手解碼才快樂        $arr[1] === '761b5f52db6dff7ce91344e99dcedab7' && die("err: [-1] - 請勿試圖用本工具解密本工具!");    } else {        die("err: [-1] - 沒有發(fā)現(xiàn)神盾特征,你確定這是神盾加密?");    }        // 匹配代碼主題部分    // '';@/$[/x00-/xff]+/(//'([/x00-/xff]+?)//'/./(    preg_match('|/'/';@/$[/x00-/xff]+/(/////'([/x00-/xff]+?)/////'/./(|s', $str, $arr) || die("err: [0] - ".$err);    $code = $arr[1];    // 匹配中間加密部分    preg_match('|/(/'([/x00-/xff]+)/',/'|s', $code, $arr) || die("err: [1] - ".$err);    $key = base64_decode(decode($arr[1], "decode"));    $code = preg_replace('|/'/.[/x00-/xff]+/'/)/)/./'|s', $key, $code);    // 匹配尾部被加密代碼    preg_match('|=/'(x[/x00-/xff]+)/'/)/);|s', $str, $arr) || die("err: [2] - ".$err);    $core = $arr[1];    // 匹配驗證key    preg_match('|[/w+/=]{59}=|s', $arr[1], $arr) || die("err: [3] - ".$err);    $key = $arr[0];    $core = str_replace($key, '', $core); // 去除key    $suffix = gzuncompress($core); // 得到 base64 的末尾部分    // 解碼    $code = gzuncompress(base64_decode($code . $suffix));    // 匹配干凈的代碼    if (preg_match('|<!--</?php endif;/?>(</?php[/r/n]{1,2}[/x00-/xff]+/?>)</?php /$GLOBALS/[|s', $code, $arr)) {        $code = $arr[1];    }    // 寫到文件    $source = $dirname . DIRECTORY_SEPARATOR . $baseName . "_source.php";    file_put_contents($source, $code);    die("解密成功,已經(jīng)保存為: " . $source);}

      

      

    PHP編程

    鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請第一時間聯(lián)系我們修改或刪除,多謝。

  • 發(fā)表評論 共有條評論
    用戶名: 密碼:
    驗證碼: 匿名發(fā)表
    主站蜘蛛池模板: 海阳市| 象州县| 濉溪县| 托克逊县| 时尚| 兴仁县| 广元市| 江口县| 保定市| 万山特区| 巴中市| 胶南市| 民和| 建平县| 安阳市| 广南县| 贵阳市| 普格县| 永昌县| 安新县| 博湖县| 安西县| 商城县| 长阳| 岳阳市| 杭锦后旗| 大渡口区| 江西省| 曲水县| 辽宁省| 天门市| 楚雄市| 江永县| 安阳县| 华安县| 长海县| 池州市| 甘肃省| 迭部县| 元阳县| 遂宁市|