您的位置:首页 > 编程语言 > PHP开发

php screw加密

2016-02-18 00:00 756 查看
Download

http://sourceforge.net/projects/php-screw/

Installation(参照压缩包内README.en)

(1) Unpack php\_screw-1.5.tgz.

(2) Customize encryption / decryption

vi my\_screw.h

change the stamp in php\_screw.h

Notice:PM9SCREW\_LEN must be less than or equal to the size of PM9SCREW.

(3) Execute the following command with directory php\_screw-1.5

phpize
./configure

(4) Compile the decryptor

make

(5) Copy modules/php\_screw.so into an extension directory.

cp modules/php\_screw.so /usr/lib/php/modules

(6) Add the next line to php.ini.

extension=php\_screw.so

(7) Restart the httpd daemon.

(8) Compile the encryption tool

cd tools
make

(9) Encrypting a PHP script

screw "Path to the PHP script to be encrypted"


遇到的问题

/opt/soft/php\_screw-1.5/php\_screw.c: In function ‘zm\_startup\_php\_screw':/opt/soft/php\_screw-1.5/php\_screw.c:124: 错误:‘zend\_compiler\_globals' 没有名为 ‘extended\_info' 的成员/opt/soft/php\_screw-1.5/php\_screw.c: In function ‘zm\_shutdown\_php\_screw':/opt/soft/php\_screw-1.5/php\_screw.c:133: 错误:‘zend\_compiler\_globals' 没有名为 ‘extended\_info' 的成员make: ** [php\_screw.lo] 错误 1*
解决方法: 需要修改php\_screw.c 把CG(extended\_info) = 1; 修改为:
CG(compiler\_options) |= ZEND\_COMPILE\_EXTENDED\_INFO;


~~~~~~~~~~~~~~~~

archlinux未遇到此错误

/root/php\_screw-1.5/php\_screw.c: In function ‘pm9screw\_compile\_file':解决方法:
需要修改php\_screw.c
把第78,84,93行的org\_compile\_file(file\_handle, type);
修改为:
org\_compile\_file(file\_handle, type TSRMLS\_CC);

然后再make就成功了。

其他加密方法

https://github.com/liexusong/php-beast
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: