程氏CMS去掉静态页面的隐藏性版权方法
实例如图:
![](https://i-blog.csdnimg.cn/blog_migrate/cef714a0781865c08e4c4d22e2481a81.jpeg)
![](https://i-blog.csdnimg.cn/blog_migrate/078be607097ef0b2b14e102a3816dca6.jpeg)
//模版解析
function skins($template,$data = null,$return_template_string = false){
$template_string = $this->Common_Mark($template,$data); //通用标签解析
if(!is_bool($return_template_string)) $return_template_string = false;
if(!$return_template_string){
$template_string.=$this->base_decode('DQo8IS0tDQogICAgICAgICBPT09PTyAgIE9PT09PICAgICBPT09PTyAgIE9PT09PTyAgICAgIE9PT09PICAgT09PT08NCiAgICAgICAgT08gICAgICAgT08gICAgICAgT08gICAgICAgT08gICAgT08gIE9PICAgT08gICBPTw0KICAgICAgICBPTyAgICAgICBPT09PTyAgICBPTyAgICAgICBPTyAgICAgIE8gTyAgICBPTyAgIE9PT09PDQogICAgICAgIE9PICAgICAgICAgIE9PICAgIE9PICAgICAgIE9PICAgICAgIE8gICAgIE9PICAgICAgT08NCiAgICAgICAgIE9PT09PICAgT08gT08gICAgIE9PT09PICAgT08gICAgICAgICAgICAgT08gICBPTyBPTyAgDQogDQogICAgICAgQ3NjbXMgVGVhbSBhbmQgQ2hzaGNtcyBVSSBUZWFtIDIwMDgtMjAxNCBDaHNoY21zLmNvbSBJbmMuDQotLT4-c');
echo $template_string;
}
找到以下代码:
DQo8IS0tDQogICAgICAgICBPT09PTyAgIE9PT09PICAgICBPT09PTyAgIE9PT09PTyAgICAgIE9PT09PICAgT09PT08NCiAgICAgICAgT08gICAgICAgT08gICAgICAgT08gICAgICAgT08gICAgT08gIE9PICAgT08gICBPTw0KICAgICAgICBPTyAgICAgICBPT09PTyAgICBPTyAgICAgICBPTyAgICAgIE8gTyAgICBPTyAgIE9PT09PDQogICAgICAgIE9PICAgICAgICAgIE9PICAgIE9PICAgICAgIE9PICAgICAgIE8gICAgIE9PICAgICAgT08NCiAgICAgICAgIE9PT09PICAgT08gT08gICAgIE9PT09PICAgT08gICAgICAgICAgICAgT08gICBPTyBPTyAgDQogDQogICAgICAgQ3NjbXMgVGVhbSBhbmQgQ2hzaGNtcyBVSSBUZWFtIDIwMDgtMjAxNCBDaHNoY21zLmNvbSBJbmMuDQotLT4-c
经过base64解码之后得到以下内容:
![](https://i-blog.csdnimg.cn/blog_migrate/dcae01ad67e50bb3cb14c4d79afa08fc.jpeg)
![](https://i-blog.csdnimg.cn/blog_migrate/c63499a2a213d9ce53d4afaa4408408b.jpeg)
$Mark_T='<head>'.$content[0].$this->base_decode('PG1ldGEgbmFtZT0iZ2VuZXJhdG9yIiBjb250ZW50PSJDc2NtcyB2My41IiAvPg0KPG1ldGEgbmFtZT0iYXV0aG9yIiBjb250ZW50PSJDc2NtcyBUZWFtIGFuZCBDaHNoY21zIFVJIFRlYW0iIC8-bDQo8bWV0YSBuYW1lPSJjb3B5cmlnaHQiIGNvbnRlbnQ9IjIwMDgtMjAxNCBDaHNoY21zLmNvbSBJbmMuIiAvPg0KPC9oZWFkPg-c-c');
@$Mark_Text=$temp[0].$Mark_T.$content[1];
从以上代码得到的加密码为以下:
PG1ldGEgbmFtZT0iZ2VuZXJhdG9yIiBjb250ZW50PSJDc2NtcyB2My41IiAvPg0KPG1ldGEgbmFtZT0iYXV0aG9yIiBjb250ZW50PSJDc2NtcyBUZWFtIGFuZCBDaHNoY21zIFVJIFRlYW0iIC8-bDQo8bWV0YSBuYW1lPSJjb3B5cmlnaHQiIGNvbnRlbnQ9IjIwMDgtMjAxNCBDaHNoY21zLmNvbSBJbmMuIiAvPg0KPC9oZWFkPg-c-c
经过解码如图:
![](https://i-blog.csdnimg.cn/blog_migrate/3b9f48b0f8201d25ffcbde5ee5c42996.jpeg)
![](https://i-blog.csdnimg.cn/blog_migrate/00d4a5eb481a16752595ea87b2201a0f.jpeg)
注:
我删除只是为了页面代码的整洁好看,同时会在主页给官方做个版权描述链接,请各位没有购买官方版权的给官网做个版权链接在主页,请保护尊重互联网商务版权!