무료 PHP 인코더(암호화)

인터넷 검색을 통해 PHP 소스 인코더를 발견했습니다.

기존 ZendGuard 같은 경우 가격이 만만치 않아서 구입하기 힘들었는데,
마침 BSD 라이센스의 제품이 있었네요.

다운1 : http://sourceforge.net/project/showfiles.php?group_id=52025
다운2 :  1192218083.gz
1. 사용환경
서버 : 리눅스, 아파치
PHP : 5.X 지원, –with-zlib로 컴파일( phpinfo(); 를 통해서 –with-zlib가 지원되는지 확인가능)

2. 인스톨방법
$ tar xvfz php_screw-1.5.tgz        <—- 압축을 풀고
$ cd  php_screw-1.5                   <—- 압축을 푼 디렉토리로 이동하고
$ phpize                                  
$ ./configure
$ vi my_screw.h                         <—- seed 키를 변경해주세요.
                                                      배열크기와 숫자크기와 인코딩 속도와는 차이가 없다고하네요
$ make                                   

$ cp modules/php_screw.so /usr/lib/php/modules/php_screw.so    <– php_screw.so 파일을 적당한곳에 복사

$ vi php.ini                       <—- php.ini 파일을 열어 아래 extension=php_screw.so을 추가해 줍니다.
                                              젠드가 설치되어 있을 경우 젠드설정보다 윗부분에 설정합니다.
   extension=php_screw.so

$ /usr/local/apache/bin/apachectl restart         <——  아파치를 재시동합니다.

$ cd tools                          
$ make                              <—- 인코딩 툴을 생성합니다.
$ cp screw /usr/bin              <—— 컴파일로 생성된 screw 파일을 적당한 디렉토리에 복사합니다.

3. 인코딩방법
$ screw 인코딩할파일.php       <——– 인코딩된 파일은 원래파일명으로 생성되고,
                                                       인코딩전 파일은 .screw 확장자가 붙습니다.

[#M_영문메뉴얼 보기|영문메뉴얼 닫기|                     [ PHP Screw – User’s Manual ver1.5 ]

1. What’s SCREW?

 PHP Screw is a PHP script encryption tool. When you are developing a
 commercial package using PHP, the script can be distributed as encrypted up
 until just before execution. This preserves your intellectual property.

2. Outline.

 The outline of PHP Screw is as follows.

 a. Encipher a PHP script with the encryption tool (screw).

 b. At the time of execution of a PHP script, the decryptor php_screw.so is
    executed as PHP-Extension, just before the PHP script is handed to the
    Zend-Compiler.

   * In fact what is necessary is just to add the description about php.screw
     to php.ini. A PHP script programmer does not need to be conscious of
     decrypting process.
     Moreover it is possible for you to intermingle an enciphered script file
     and an unenciphered one.

   * The encryption logic in the encryption tool (screw) and the decryption
     logic in the decryptor (php_screw), can be cutomized easily.

   * The normal purpose code and decryption logic included, can be customized
     by only changing the encryption SEED key.
     Although it is easy to cusomize the encryption, by the encryption SEED, it
     does NOT mean, that the PHP scripts can be decrypted by others easily.

3. Requirement

 (1) PHP5.x
     NOTICE: PHP must be compiled with the “–with-zlib” option.
     Check that PHP has zlib compiled in it with the PHP script:
     “<? gzopen(); ?>”
     If PHP knows about the function you can happily proceed.

 (2) UNIX like OS (LINUX, FreeBSD, etc. are included)

4. Installation.

 (1) Unpack php_screw-1.5.tgz.

 (2) Execute the following command with directory php_screw-1.5

       phpize
       ./configure

 (3) Customize encryption / decryption

       vi my_screw.h

       — Please change the encryption SEED key (pm9screw_mycryptkey) into the
          values according to what you like.
          The encryption will be harder to break, if you add more values to the
      encryption SEED array. However, the size of the SEED is unrelated to
      the time of the decrypt processing.

       *  If you can read and understand the source code, to modify an original
          encryption logic will be possible. But in general, this should not
      be necessary.

       OPTIONAL: Encrypted scripts get a stamp added to the beginning of the
         file. If you like, you may change this stamp defined by
         PM9SCREW and PM9SCREW_LEN in php_screw.h. PM9SCREW_LEN must
         be less than or equal to the size of PM9SCREW.

 (4) Compile the decryptor

       make

 (5) Copy modules/php_screw.so into an extension directory.

       ex) cp modules/php_screw.so /usr/lib/php/modules/php_screw.so

 (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) Copy the encryptor (“screw”) into an appropriate directory.

5. User’s manual.

 (1) Encrypting a PHP script:
     Please execute the following command.

        screw “Path to the PHP script to be encrypted”

     The above line creates the script file enciphered by the same name.
     Moreover, a backup is created in the same directory by the name of script
     file name .screw.
     WARNING: When you perform packaging, do NOT forget remove the .screw file.
                             
 (2) Executing a PHP script.
     If the installation of php_screw.so went OK, encrypted PHP scripts can now
     be copied to an appropriate directory and executed as if it was
     unencrypted. That is: The encryption is transparent for the
     user.

6. History

 2002/04/25 PHP Screw ver1.0
 2002/05/21 PHP Screw ver1.1 — Fixed include_path problem.
 2002/08/02 PHP Screw ver1.2 — Changed encryption algorithm
 2004/01/11 PHP Screw ver1.3 — Changed to BSD License(revised), Correspondence to php-4.3.x
 2007/10/11 PHP Screw ver1.5 — Correspondence to PHP5.x

7. Copyright
 (C) 2007 Kunimasa Noda/PM9.com, Inc.
 contact:  http://www.pm9.com,  kuni@pm9.com_M#]

You may also like...

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다