壓縮編碼(加密)代碼: 復制代碼 代碼如下:<?php function encode_f " /> 黄色一级网站,毛片最新网址,亚洲精品乱码久久久久久动漫

四虎精品视频-四虎精品成人免费网站-四虎黄色网-四虎国产视频-国产免费91-国产蜜臀97一区二区三区

PHP base64+gzinflate壓縮編碼和解碼代碼

base64+gzinflate壓縮編碼(加密)過的文件通常是以 <? eval(gzinflate(base64_decode( 為頭的一個php文件。以下我們給出了相關的編碼解碼(加密解密)代碼。

壓縮編碼(加密)代碼:
復制代碼 代碼如下:
<?php
function encode_file_contents($filename) {
$type=strtolower(substr(strrchr($filename,'.'),1));
if('php'==$type && is_file($filename) && is_writable($filename)){// 如果是php文件 并且可寫 則進行壓縮編碼
$contents = file_get_contents($filename);// 判斷文件是否已經(jīng)被編碼處理
$pos = strpos($contents,'/*Protected by 草名 http://www.crazyi.cn Cryptation*/');
if(false === $pos || $pos>100){ // 去除php文件注釋和空白,減少文件大小
$contents = php_strip_whitespace($filename);
// 去除php頭部和尾部標識
$headerPos = strpos($contents,'<?php');
$footerPos = strrpos($contents,'?>');
$contents = substr($contents,$headerPos+5,$footerPos-$headerPos);
$encode = base64_encode(gzdeflate($contents));// 開始編碼
$encode = '<?php'." /*Protected by 草名 http://www.crazyi.cn Cryptation*//n eval(gzinflate(base64_decode(".$encode.")));/n /*Reverse engineering is illegal and strictly prohibited- (C)草名 Cryptation 2008*/ /n?>";
return file_put_contents($filename,$encode);
}
}
return false;
}
//調用函數(shù)
$filename='g:/我的文檔/桌面/test.php';
encode_file_contents($filename);
?>
<?php
function encode_file_contents($filename) {
$type=strtolower(substr(strrchr($filename,'.'),1));
if('php'==$type && is_file($filename) && is_writable($filename)){// 如果是php文件 并且可寫 則進行壓縮編碼
$contents = file_get_contents($filename);// 判斷文件是否已經(jīng)被編碼處理
$pos = strpos($contents,'/*Protected by 草名 http://www.crazyi.cn Cryptation*/');
if(false === $pos || $pos>100){ // 去除php文件注釋和空白,減少文件大小
$contents = php_strip_whitespace($filename);
// 去除php頭部和尾部標識
$headerPos = strpos($contents,'<?php');
$footerPos = strrpos($contents,'?>');
$contents = substr($contents,$headerPos+5,$footerPos-$headerPos);
$encode = base64_encode(gzdeflate($contents));// 開始編碼
$encode = '<?php'." /*Protected by 草名 http://www.crazyi.cn Cryptation*//n eval(gzinflate(base64_decode(".$encode.")));/n /*Reverse engineering is illegal and strictly prohibited- (C)草名 Cryptation 2008*/ /n?>";
return file_put_contents($filename,$encode);
}
}
return false;
}
//調用函數(shù)
$filename='g:/我的文檔/桌面/test.php';
encode_file_contents($filename);
?>


壓縮解碼(解密)代碼:
復制代碼 代碼如下:
<?php
$Code = '這里填寫要解密的編碼'; // base64編碼
$File = 'test.php';//解碼后保存的文件
$Temp = base64_decode($Code);
$temp = gzinflate($Temp);
$FP = fopen($File,"w");
fwrite($FP,$temp);
fclose($FP);
echo "解密成功!";
?>

php技術PHP base64+gzinflate壓縮編碼和解碼代碼,轉載需保留來源!

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

主站蜘蛛池模板: tvb翡翠台直播| 尹丽川| 钉子电影电视剧| 浙江卫视全天节目单| 我的新学校英语作文| 厕所英雄| 拔萝卜电视剧高清免费观看全集| s0hu搜狐| 胭脂 电视剧| 泪桥简谱| 爆操在线观看| 凶宅幽灵| 朝雪录电视剧免费观看| 无声真相电影免费观看| 浙江卫视奔跑吧官网| 蛋仔图片100张| 原野电影| 挠中国美女丝袜脚心| 误杀1演员表| 好茶叶排名前十名| 极品电影网| 荒野求生21天美国原版观看| 夫妻的世界韩国电影| 每天一分钱每天翻一倍连续30天| 袁隆平电影| 吻胸捏胸揉视频大全| 美女上厕所| 电影《年龄差》| 李俊宇| 我,喜欢你演员表介绍| 富贵不能淫翻译| 李采潭全部电影作品| 守株待兔评课| 凌博控制器| 善良的姐妹| 爱一个人好难吉他谱| 爱欲1990未删减版播放| 王家卫作品| 杨贵妃黄色片| 抗日电影免费| 公主们的战国|