BO-BLOG的base64编码和解码
很多人遇到BO-BLOG插件或模块里面出现的类似下面这样的代码
<php>Z2xvYmFsICRsYW5nZnJvbnQsICR0ZW1wbGF0ZTsNCiRsYW5nZm</php>
这一部分也就是被<php></php>包围起来的部分就是base64_encode后的php代码。
下面给出解决方法!
以下请另存为decodephp.php直接打开就能用了。
<?PHPerror_report ing(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 style="text-align: center;">
<div style="text-align: left; width: 90%; font-family: Verdana; font-size:14px; margin: auto; background: #EFEFEF; color: #000;"><b>Result:
</b><br><br><?php echo ($code) ;?><br><br></div><br><br>
<form action="decodephp.php" method='post' >
<textarea name='code' cols=' 100' rows=' 16' ></textarea><br>
<input type='radio' name='action' value='decode' checked>DECODE <input type='radio' name='action' 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'id=' skinselector' ><select name=' tem'onchange=\"document.getElementById(' skinselector' ) . submit() ;\"><optionvalue='____' >{$langforselskin}</option>{$optionskinlist}</select></form>";?>
DiyVM是一家比较低调的国人主机商,成立于2009年,提供VPS主机和独立服务器租用等产品,其中VPS基于XEN(HVM)架构,数据中心包括香港沙田、美国洛杉矶和日本大阪等,CN2或者直连线路,支持异地备份与自定义镜像,可提供内网IP。本月商家最高提供5折优惠码,优惠后香港沙田CN2线路VPS最低2GB内存套餐每月仅50元起。香港(CN2)VPSCPU:2cores内存:2GB硬盘:50GB/R...
老薛主机,虽然是第一次分享这个商家的信息,但是这个商家实际上也有存在有一些年头。看到商家有在进行夏季促销,比如我们很多网友可能有需要的香港VPS主机季度及以上可以半价优惠,如果有在选择不同主机商的香港机房的可以看看老薛主机商家的香港VPS。如果没有记错的话,早年这个商家是主营个人网站虚拟主机业务的,还算不错在异常激烈的市场中生存到现在,应该算是在众多商家中早期积累到一定的用户群的,主打小众个人网站...
华纳云双11钜惠出海:CN2海外物理服务器终身价688元/月,香港/美国机房,免费送20G DDos防御,50M CN2或100M国际带宽可选,(文内附带测评)华纳云作为一家专业的全球数据中心基础服务提供商,总部在香港,拥有香港政府颁发的商业登记证明,APNIC 和 ARIN 会员单位。主营香港服务器、美国服务器、香港/美国OpenStack云服务器、香港高防物理服务器、美国高防服务器、香港高防I...