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>";?>
轻云互联成立于2018年的国人商家,广州轻云互联网络科技有限公司旗下品牌,主要从事VPS、虚拟主机等云计算产品业务,适合建站、新手上车的值得选择,香港三网直连(电信CN2GIA联通移动CN2直连);美国圣何塞(回程三网CN2GIA)线路,所有产品均采用KVM虚拟技术架构,高效售后保障,稳定多年,高性能可用,网络优质,为您的业务保驾护航。活动规则:用户购买任意全区域云服务器月付以上享受免费更换IP服...
HostKvm又上新了,这次上架了2个线路产品:俄罗斯和香港高防VPS,其中俄罗斯经测试电信CN2线路,而香港高防VPS提供30Gbps攻击防御。HostKvm是一家成立于2013年的国外主机服务商,主要提供基于KVM架构的VPS主机,可选数据中心包括日本、新加坡、韩国、美国、中国香港等多个地区机房,均为国内直连或优化线路,延迟较低,适合建站或者远程办公等。俄罗斯VPSCPU:1core内存:2G...
2021年9月中秋特惠优惠促销来源:数脉科技 编辑:数脉科技编辑部 发布时间:2021-09-11 03:31尊敬的新老客户:9月优惠促销信息如下,10Mbps、 30Mbps、 50Mbps、100Mbps香港优质或BGPN2、阿里云线路、华为云线路,满足多种项目需求!支持测试。全部线路首月五折起。数脉官网 https://my.shuhost.com/香港特价数脉阿里云华为云 10MbpsCN...