This theme is released under creative commons licence, all links in the footer should remain intact.
Author: Eric // Category: Free Teaching00. 剛才要幫忙解決移除佈景側欄的問題就下載了對方使用的 interior-theme-10 風格, 一解壓縮並於後台啟用, 都還沒做任何修改, 結果 WordPress 前後台都出現下面那一段話。 "This theme is released under creative commons licence, all links in the footer should remain intact."
01. 於是打開了 functions.php 和 footer.php 就大概知道發生什麼事了。
02. 刪除 functions.php 裡看起來就不是什麼好東西的 code // 跟 eval 有關的
eg: eval(str_rot13('......'));
03. 怕沒刪除乾淨, 於是又用 Editor 檢查看看是不是還有被 eval 加密的 // 常在 functions.php, header.php
a. EmEditor -> 搜尋 -> 從檔案中尋找 -> 尋找: eval, 檔案類型: *.php, 在資料夾: 設定您該 Theme 所在位置 -> 尋找
b. NotePad++ -> 尋找 -> 搜尋目錄 -> 尋找目標: eval, 檔案類型: *.php, 資料夾: 設定您該 Theme 所在位置 -> 全找
c. UltraEdit -> 搜尋 -> 在檔案中尋找 -> 搜尋什麼: eval, 於檔案/類型: *.php, 目錄: 設定您該 Theme 所在位置 -> 搜尋
d. PSPad -> 搜尋 -> 多重檔案尋找/取代 -> 要搜尋文字: eval, 選擇的目錄: 設定您該 Theme 所在位置, 檔案過濾: *.php -> 確定
04. 找到含有 eval 的檔案後, 除了 footer.php, 其它檔案打開刪除包含 eval() 那句即可
不過如果像是
<?php eval(str_rot13('')); wp_head(); ?>則不能直接刪除, 而要改成
<?php wp_head(); ?>
05. 如果想看看 footer.php 就用下面的方法
a. 使用 base64 Decoder : 如果 footer 加密方式是 eval(gzinflate(str_rot13(base64_decode('......')))); or eval(gzinflate(base64_decode('')));
b. 使用 byteRun Decoder : 如果 footer 加密方式是 $_F=__FILE__;$_X='......';eval(base64_decode('......'));
c. 在 ./wp-content/themes/主題名稱/index.php 找到, 在其前後分別加上一些註解, 然後打開您的 WordPress, 檢是原始碼, 找到 、之間的內容, 即為您的 footer 的內容。
<!--Start of footer--> <?php get_footer(); ?> <!--End of footer-->
// 不過如果有用 Autoptimize 這個插件, 它可是把註解吃到, 所以可以改成
<h1>Start of footer</h1> <?php get_footer(); ?> <h1>End of footer</h1>
Tags: Autoptimize, base64_decode, byteRun Decode, eval, footer, gzinflate, str_rot13, theme