BO-BLOG的base64编码和解码
<php>Z2xvYmFsICRsYW5nZnJvbnQsICR0ZW1wbGF0ZTsNCiRsYW5nZm</php>
下面给出解决方法!
以下请另存为 decodephp.php,直接打开就能用了。
<?PHP
error_reporting(E_ERROR | E_WARNING | E_PARSE);
@set_magic_quotes_runtime (0);
@header("Content-Type: text/html; charset=utf-8");
$code=$_POST['code'];
$action=$_REQUEST['action'];
if (get_magic_quotes_gpc()) $code=stripslashes($code);
if ($action=='decode') {
$code=base64_decode($code);
$code=nl2br(htmlspecialchars($code));
}
else $code=base64_encode($code);
?>
<html>
<body>
<div><b>Result: </b><br><br><?php echo ($code);?><br><br></div><br><br>
<form action="decodephp.php" method='post'>
<textarea cols='100' rows='16'></textarea><br>
<input type='radio' value='decode' checked>DECODE <input type='radio' value='encode'>ENCODE<br><br>
<input type='submit'> <input type='reset'>
</form>
</body>
</html>
将侧边栏模板切换器的编码部分(不包含<php>和</php>)拷贝到输入框内,解码后的结果为:
<?
global $langfront, $template;
$langforselskin=($langfront=='zh-tw') ? '恢復預設' : '恢复默认';
include_once ("data/cache_skinlist.php");
if (is_array($skinset)) {
foreach ($skinset as $skin) {
@list($skid, $skname, $skauthor, $skintro, $skdir, $skthumbnail)=@explode('|', $skin);
if ($skid==$template['id']) $optionskinlist.="<option value='{$skdir}' selected='selected'>{$skname}</option>";
else $optionskinlist.="<option value='{$skdir}'>{$skname}</option>";
}
}
$phpreturn="<form action='index.php' method='post'><select onchange=\"document.getElementById('skinselector').submit();\"><option value='____'>{$langforselskin}</option>{$optionskinlist}</select></form>";
?>