解開WP Theme footer.php被加密 – Decrypt or Decode Eval Gzinflate Base64_Decode
Author: Eric // Category: Free Resource, Free Teaching00. 請同意閱讀後,不會修改掉Theme(風格)作者的資訊,感謝配合。
01. 有時候好不容易看中意一個 WordPress Theme,不幸的是把 footer.php 打開來卻發現,它怎麼變的鬼模鬼樣,不是一般熟悉的 PHP、Html 語法。這時如果你需要放廣告在最下面,或者需要放此空間由xxx提供、代管之類的文字,但 footer 又不能更改,且又不想改放在其它位置,這時你可能就會放棄這個好不容易看上的 Theme (風格),想著或許它不是我的 soulmate,所以又再一次踏上尋覓之路。如果你有上述的問題,且你的 footer 的編碼的方式是類似於 eval gzinflate base64_decode,就請照著下面的步驟來解決吧。
02. 請先連到 Decrypt or Decode eval gzinflate base64_decode
03. 原本footer.php大概是長的這樣
<? eval(gzinflate(str_rot13(base64_decode('................')))); ?>
04. 但我們只需要把中間的程式碼貼到上方大框框,然後按下Decode即可
eval(gzinflate(str_rot13(base64_decode('................'))));05. 神奇的事情就發生了
?> <!-- Sidebar -->
<div class="sidebar sidebar-right">
<h3>Categories</h3>
<ul>
<?php noXD_list_categories('title_li='); ?>
</ul>
<h3>Blogroll</h3>
<ul>
<?php noXD_list_bookmarks('categorize=0&title_li='); ?>
</ul>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(2) ) : ?>
<?php endif; ?>
</div>
<!-- Sidebar -->
<div class="clear"></div>
</div></div></div>
<!-- /Main -->
<!-- Footer -->
<div id="footer">
<!-- Copyright -->
<div id="copyright">
<br />(c)Copyrighted <?php bloginfo('name'); ?>, All Rights Reserved.<br />
Designed by: <a href="http://www.reikimadrid.com">Reiki</a>
</div>
<!-- /Copyright -->
</div>
<!-- Footer -->
</div>
<!-- /Page -->
<?php noXD_footer(); ?>
</body>
</html><?
06. 如果 Decrypt or Decode eval gzinflate base64_decode 連不上去,請複製下面的PHP Code,檔名存成decrypt.php
<?php
echo "\nDECODE nested eval(gzinflate()) by DEBO Jurgen <jurgen@person.be>\n\n";
echo "1. Reading coded.txt\n";
$fp1 = fopen ("coded.txt", "r");
$contents = fread ($fp1, filesize ("coded.txt"));
fclose($fp1);
echo "2. Decoding\n";
while (preg_match("/eval\(gzinflate/",$contents)) {
$contents=preg_replace("/<\?|\?>/", "", $contents);
eval(preg_replace("/eval/", "\$contents=", $contents));
}
echo "3. Writing decoded.txt\n";
$fp2 = fopen("decoded.txt","w");
fwrite($fp2, trim($contents));
fclose($fp2);
?>
07. 然後新增兩個空白的文字檔案,名稱分別為coded.txt和decoded.txt。把剛剛要放到大框框的那串語法貼到裡面coded.txt;decoded.txt裡面的內容則是保持空白即可。
08. 然後把這三個檔案上傳到有支援PHP的空間,或者自己用AppServ建個PHP環境,如果你的主機不是Windows,請把decoded.txt設成666 (CHMOD)。
08. 最後打開 http://你的網址/如果有放在資料夾下/decrypt.php,然後把經過解碼後的decoded.txt下載下來就是你的footer.php未經編碼前的樣子了。
// 有的Theme從後台編輯,就可以看到正常的PHP程式碼
// 此方法只適合解 eval(gzinflate(str_rot13(base64_decode('code'))));
// 再補幾個也是提供相關服務的網站吧
a.) Decrypt or Decode PHP files encoded with $_F=__FILE__;$_X= ByteRun Encoding
b.) Eval Gzinflate Base64_Decode PHP Decoder
Ref :
01. Decoding Eval Gzinflate Base64_Decode
02. PHP Tool Free Code Decode Eval Gzinflate Base64decode
03. PHP Function Eval
Tags: Decode, Decrypt, Eval Gzinflate Base64_Decode, footer, PHP
August 23rd, 2009 at 12:01 AM
真神奇喔。。~~~~~~非非常常感谢。。