一、php screw plus是什么?
php screw plus 是使用screw plus来保护php代码安全的扩展
二、使用步骤
1.下载本程序下载地址
链接: https://pan.baidu.com/s/12YFj955QIEis-M4TrcM6dw 提取码: 76xn
2.解压到服务器,修改默认的加密key,改为自己的。
[root@S241026 php-screw-plus-master]# vi php_screw_plus.h
3.执行 phpize 自动生成扩展所需文件
phpize
4.配置扩展
./configure --with-php-config=/www/server/php/74/bin/php-config
make
make install
5.修改php.ini,重启php查看扩展
6.进入tools文件夹 执行make
[root@S241026 php-screw-plus-master]# cd tools/
[root@S241026 tools]# ls
Makefile screw.c
[root@S241026 tools]# make
gcc -o screw screw.c -lz
[root@S241026 tools]# ls
Makefile screw screw.c
[root@S241026 tools]#
7.文件加解密
加密:执行./screw [目录或文件] ,后面带上你要加密的目录或文件即可自动开始加密
./screw filename.php
注意: 这里代码会直接被修改为乱码, 建议提前备份好源码
vim /www/wwwroot/030632.ichengyun.net/app/cmsbackstage/controller/Customer.php
解密:执行./screw filename.php 是加密 后面加-d参数则是解密 例如
./screw filename.php -d