PHPスクリプトの一部を暗号化する

PHPでプログラムを作成する人の多くは、サイドに送信するためにスクリプトをバイトコードで暗号化する必要に直面しています。 神に感謝します。今日、PHPエンコーダーの膨大な品揃えがあります-彼らが言うように、あらゆる味と色のために!



私たちの仕事では、重要な仕事に直面しました。 コードの一部を非表示にすることだけが必要でした。この関数は、その内容が私たち以外には見えないようにする必要があります。



同時に、ファイル全体を暗号化することはできません。これは、受信者の技術専門家がスクリプトに「犯罪」がないと確信できるように、この機能以外はすべて表示する必要があるためです。 また、関数全体を別のファイルにエクスポートすることもできません。コード全体のmd5が変更されていないことを確信する必要があるためです。



どうする 最初に思いついたのは、いわゆる難読化ツール、つまり「混乱する」コードでした。 さらに、このようなコードは、PHPの追加ローダーモジュールを必要とせずにロードできます。これはプラスです。 欠点は、発見された最も激しい難読化ツールでさえ、過度の急ぎなしで15〜20分以内に段階的に壊れていたことです。



一方、古き良きZend Encoder 3.6は棚にほこりを集めていました。 エンコーダでスクリプトの一部を暗号化できないことは明らかですが、タスクには解決策が必要です。 結果の暗号化されたファイルを見ると、各ファイルの先頭にPHPコードの一部があります。



<? php @ Zend ; 3272 ; /* This is not a text file ! */ print "\n" ; print "\n" ; print "&# 38 ; lt ; h1 > Zend Optimizer not installed < /h1 > "; print "This file was encoded by the Zend Encoder / Zend SafeGuard Suite\n"; print "In order to run it, please install the freely available Zend Optimizer, version 2.1.0 or later.\n"; print " < h2 > What is the Zend Optimizer? < /h2 > "; print < < < EOM The Zend Optimizer is one of the most popular PHP plugins for performance-improvement , and has been freely available since the early days of PHP 4 . It improves performance by taking PHP ' s intermediate code through multiple Optimization Passes , which replace inefficient code patterns with efficient code blocks . The replacement code blocks perform exactly the same operations as the original code , only faster . In addition to performance-improvement , the Zend Optimizer also enables PHP to transparently load files encoded by the Zend Encoder or Zend SafeGuard Suite . The Zend Optimizer is a freely-available product from Zend Technologies . Zend Technologies is the company that develops the scripting engine of PHP , also known as the Zend Engine . EOM ; print "\n" ; exit (); ? > * This source code was highlighted with Source Code Highlighter .



  1. <? php @ Zend ; 3272 ; /* This is not a text file ! */ print "\n" ; print "\n" ; print "&# 38 ; lt ; h1 > Zend Optimizer not installed < /h1 > "; print "This file was encoded by the Zend Encoder / Zend SafeGuard Suite\n"; print "In order to run it, please install the freely available Zend Optimizer, version 2.1.0 or later.\n"; print " < h2 > What is the Zend Optimizer? < /h2 > "; print < < < EOM The Zend Optimizer is one of the most popular PHP plugins for performance-improvement , and has been freely available since the early days of PHP 4 . It improves performance by taking PHP ' s intermediate code through multiple Optimization Passes , which replace inefficient code patterns with efficient code blocks . The replacement code blocks perform exactly the same operations as the original code , only faster . In addition to performance-improvement , the Zend Optimizer also enables PHP to transparently load files encoded by the Zend Encoder or Zend SafeGuard Suite . The Zend Optimizer is a freely-available product from Zend Technologies . Zend Technologies is the company that develops the scripting engine of PHP , also known as the Zend Engine . EOM ; print "\n" ; exit (); ? > * This source code was highlighted with Source Code Highlighter .



  2. <? php @ Zend ; 3272 ; /* This is not a text file ! */ print "\n" ; print "\n" ; print "&# 38 ; lt ; h1 > Zend Optimizer not installed < /h1 > "; print "This file was encoded by the Zend Encoder / Zend SafeGuard Suite\n"; print "In order to run it, please install the freely available Zend Optimizer, version 2.1.0 or later.\n"; print " < h2 > What is the Zend Optimizer? < /h2 > "; print < < < EOM The Zend Optimizer is one of the most popular PHP plugins for performance-improvement , and has been freely available since the early days of PHP 4 . It improves performance by taking PHP ' s intermediate code through multiple Optimization Passes , which replace inefficient code patterns with efficient code blocks . The replacement code blocks perform exactly the same operations as the original code , only faster . In addition to performance-improvement , the Zend Optimizer also enables PHP to transparently load files encoded by the Zend Encoder or Zend SafeGuard Suite . The Zend Optimizer is a freely-available product from Zend Technologies . Zend Technologies is the company that develops the scripting engine of PHP , also known as the Zend Engine . EOM ; print "\n" ; exit (); ? > * This source code was highlighted with Source Code Highlighter .



  3. <? php @ Zend ; 3272 ; /* This is not a text file ! */ print "\n" ; print "\n" ; print "&# 38 ; lt ; h1 > Zend Optimizer not installed < /h1 > "; print "This file was encoded by the Zend Encoder / Zend SafeGuard Suite\n"; print "In order to run it, please install the freely available Zend Optimizer, version 2.1.0 or later.\n"; print " < h2 > What is the Zend Optimizer? < /h2 > "; print < < < EOM The Zend Optimizer is one of the most popular PHP plugins for performance-improvement , and has been freely available since the early days of PHP 4 . It improves performance by taking PHP ' s intermediate code through multiple Optimization Passes , which replace inefficient code patterns with efficient code blocks . The replacement code blocks perform exactly the same operations as the original code , only faster . In addition to performance-improvement , the Zend Optimizer also enables PHP to transparently load files encoded by the Zend Encoder or Zend SafeGuard Suite . The Zend Optimizer is a freely-available product from Zend Technologies . Zend Technologies is the company that develops the scripting engine of PHP , also known as the Zend Engine . EOM ; print "\n" ; exit (); ? > * This source code was highlighted with Source Code Highlighter .



  4. <? php @ Zend ; 3272 ; /* This is not a text file ! */ print "\n" ; print "\n" ; print "&# 38 ; lt ; h1 > Zend Optimizer not installed < /h1 > "; print "This file was encoded by the Zend Encoder / Zend SafeGuard Suite\n"; print "In order to run it, please install the freely available Zend Optimizer, version 2.1.0 or later.\n"; print " < h2 > What is the Zend Optimizer? < /h2 > "; print < < < EOM The Zend Optimizer is one of the most popular PHP plugins for performance-improvement , and has been freely available since the early days of PHP 4 . It improves performance by taking PHP ' s intermediate code through multiple Optimization Passes , which replace inefficient code patterns with efficient code blocks . The replacement code blocks perform exactly the same operations as the original code , only faster . In addition to performance-improvement , the Zend Optimizer also enables PHP to transparently load files encoded by the Zend Encoder or Zend SafeGuard Suite . The Zend Optimizer is a freely-available product from Zend Technologies . Zend Technologies is the company that develops the scripting engine of PHP , also known as the Zend Engine . EOM ; print "\n" ; exit (); ? > * This source code was highlighted with Source Code Highlighter .



  5. <? php @ Zend ; 3272 ; /* This is not a text file ! */ print "\n" ; print "\n" ; print "&# 38 ; lt ; h1 > Zend Optimizer not installed < /h1 > "; print "This file was encoded by the Zend Encoder / Zend SafeGuard Suite\n"; print "In order to run it, please install the freely available Zend Optimizer, version 2.1.0 or later.\n"; print " < h2 > What is the Zend Optimizer? < /h2 > "; print < < < EOM The Zend Optimizer is one of the most popular PHP plugins for performance-improvement , and has been freely available since the early days of PHP 4 . It improves performance by taking PHP ' s intermediate code through multiple Optimization Passes , which replace inefficient code patterns with efficient code blocks . The replacement code blocks perform exactly the same operations as the original code , only faster . In addition to performance-improvement , the Zend Optimizer also enables PHP to transparently load files encoded by the Zend Encoder or Zend SafeGuard Suite . The Zend Optimizer is a freely-available product from Zend Technologies . Zend Technologies is the company that develops the scripting engine of PHP , also known as the Zend Engine . EOM ; print "\n" ; exit (); ? > * This source code was highlighted with Source Code Highlighter .



  6. <? php @ Zend ; 3272 ; /* This is not a text file ! */ print "\n" ; print "\n" ; print "&# 38 ; lt ; h1 > Zend Optimizer not installed < /h1 > "; print "This file was encoded by the Zend Encoder / Zend SafeGuard Suite\n"; print "In order to run it, please install the freely available Zend Optimizer, version 2.1.0 or later.\n"; print " < h2 > What is the Zend Optimizer? < /h2 > "; print < < < EOM The Zend Optimizer is one of the most popular PHP plugins for performance-improvement , and has been freely available since the early days of PHP 4 . It improves performance by taking PHP ' s intermediate code through multiple Optimization Passes , which replace inefficient code patterns with efficient code blocks . The replacement code blocks perform exactly the same operations as the original code , only faster . In addition to performance-improvement , the Zend Optimizer also enables PHP to transparently load files encoded by the Zend Encoder or Zend SafeGuard Suite . The Zend Optimizer is a freely-available product from Zend Technologies . Zend Technologies is the company that develops the scripting engine of PHP , also known as the Zend Engine . EOM ; print "\n" ; exit (); ? > * This source code was highlighted with Source Code Highlighter .



  7. <? php @ Zend ; 3272 ; /* This is not a text file ! */ print "\n" ; print "\n" ; print "&# 38 ; lt ; h1 > Zend Optimizer not installed < /h1 > "; print "This file was encoded by the Zend Encoder / Zend SafeGuard Suite\n"; print "In order to run it, please install the freely available Zend Optimizer, version 2.1.0 or later.\n"; print " < h2 > What is the Zend Optimizer? < /h2 > "; print < < < EOM The Zend Optimizer is one of the most popular PHP plugins for performance-improvement , and has been freely available since the early days of PHP 4 . It improves performance by taking PHP ' s intermediate code through multiple Optimization Passes , which replace inefficient code patterns with efficient code blocks . The replacement code blocks perform exactly the same operations as the original code , only faster . In addition to performance-improvement , the Zend Optimizer also enables PHP to transparently load files encoded by the Zend Encoder or Zend SafeGuard Suite . The Zend Optimizer is a freely-available product from Zend Technologies . Zend Technologies is the company that develops the scripting engine of PHP , also known as the Zend Engine . EOM ; print "\n" ; exit (); ? > * This source code was highlighted with Source Code Highlighter .



  8. <? php @ Zend ; 3272 ; /* This is not a text file ! */ print "\n" ; print "\n" ; print "&# 38 ; lt ; h1 > Zend Optimizer not installed < /h1 > "; print "This file was encoded by the Zend Encoder / Zend SafeGuard Suite\n"; print "In order to run it, please install the freely available Zend Optimizer, version 2.1.0 or later.\n"; print " < h2 > What is the Zend Optimizer? < /h2 > "; print < < < EOM The Zend Optimizer is one of the most popular PHP plugins for performance-improvement , and has been freely available since the early days of PHP 4 . It improves performance by taking PHP ' s intermediate code through multiple Optimization Passes , which replace inefficient code patterns with efficient code blocks . The replacement code blocks perform exactly the same operations as the original code , only faster . In addition to performance-improvement , the Zend Optimizer also enables PHP to transparently load files encoded by the Zend Encoder or Zend SafeGuard Suite . The Zend Optimizer is a freely-available product from Zend Technologies . Zend Technologies is the company that develops the scripting engine of PHP , also known as the Zend Engine . EOM ; print "\n" ; exit (); ? > * This source code was highlighted with Source Code Highlighter .



  9. <? php @ Zend ; 3272 ; /* This is not a text file ! */ print "\n" ; print "\n" ; print "&# 38 ; lt ; h1 > Zend Optimizer not installed < /h1 > "; print "This file was encoded by the Zend Encoder / Zend SafeGuard Suite\n"; print "In order to run it, please install the freely available Zend Optimizer, version 2.1.0 or later.\n"; print " < h2 > What is the Zend Optimizer? < /h2 > "; print < < < EOM The Zend Optimizer is one of the most popular PHP plugins for performance-improvement , and has been freely available since the early days of PHP 4 . It improves performance by taking PHP ' s intermediate code through multiple Optimization Passes , which replace inefficient code patterns with efficient code blocks . The replacement code blocks perform exactly the same operations as the original code , only faster . In addition to performance-improvement , the Zend Optimizer also enables PHP to transparently load files encoded by the Zend Encoder or Zend SafeGuard Suite . The Zend Optimizer is a freely-available product from Zend Technologies . Zend Technologies is the company that develops the scripting engine of PHP , also known as the Zend Engine . EOM ; print "\n" ; exit (); ? > * This source code was highlighted with Source Code Highlighter .



  10. <? php @ Zend ; 3272 ; /* This is not a text file ! */ print "\n" ; print "\n" ; print "&# 38 ; lt ; h1 > Zend Optimizer not installed < /h1 > "; print "This file was encoded by the Zend Encoder / Zend SafeGuard Suite\n"; print "In order to run it, please install the freely available Zend Optimizer, version 2.1.0 or later.\n"; print " < h2 > What is the Zend Optimizer? < /h2 > "; print < < < EOM The Zend Optimizer is one of the most popular PHP plugins for performance-improvement , and has been freely available since the early days of PHP 4 . It improves performance by taking PHP ' s intermediate code through multiple Optimization Passes , which replace inefficient code patterns with efficient code blocks . The replacement code blocks perform exactly the same operations as the original code , only faster . In addition to performance-improvement , the Zend Optimizer also enables PHP to transparently load files encoded by the Zend Encoder or Zend SafeGuard Suite . The Zend Optimizer is a freely-available product from Zend Technologies . Zend Technologies is the company that develops the scripting engine of PHP , also known as the Zend Engine . EOM ; print "\n" ; exit (); ? > * This source code was highlighted with Source Code Highlighter .



  11. <? php @ Zend ; 3272 ; /* This is not a text file ! */ print "\n" ; print "\n" ; print "&# 38 ; lt ; h1 > Zend Optimizer not installed < /h1 > "; print "This file was encoded by the Zend Encoder / Zend SafeGuard Suite\n"; print "In order to run it, please install the freely available Zend Optimizer, version 2.1.0 or later.\n"; print " < h2 > What is the Zend Optimizer? < /h2 > "; print < < < EOM The Zend Optimizer is one of the most popular PHP plugins for performance-improvement , and has been freely available since the early days of PHP 4 . It improves performance by taking PHP ' s intermediate code through multiple Optimization Passes , which replace inefficient code patterns with efficient code blocks . The replacement code blocks perform exactly the same operations as the original code , only faster . In addition to performance-improvement , the Zend Optimizer also enables PHP to transparently load files encoded by the Zend Encoder or Zend SafeGuard Suite . The Zend Optimizer is a freely-available product from Zend Technologies . Zend Technologies is the company that develops the scripting engine of PHP , also known as the Zend Engine . EOM ; print "\n" ; exit (); ? > * This source code was highlighted with Source Code Highlighter .



  12. <? php @ Zend ; 3272 ; /* This is not a text file ! */ print "\n" ; print "\n" ; print "&# 38 ; lt ; h1 > Zend Optimizer not installed < /h1 > "; print "This file was encoded by the Zend Encoder / Zend SafeGuard Suite\n"; print "In order to run it, please install the freely available Zend Optimizer, version 2.1.0 or later.\n"; print " < h2 > What is the Zend Optimizer? < /h2 > "; print < < < EOM The Zend Optimizer is one of the most popular PHP plugins for performance-improvement , and has been freely available since the early days of PHP 4 . It improves performance by taking PHP ' s intermediate code through multiple Optimization Passes , which replace inefficient code patterns with efficient code blocks . The replacement code blocks perform exactly the same operations as the original code , only faster . In addition to performance-improvement , the Zend Optimizer also enables PHP to transparently load files encoded by the Zend Encoder or Zend SafeGuard Suite . The Zend Optimizer is a freely-available product from Zend Technologies . Zend Technologies is the company that develops the scripting engine of PHP , also known as the Zend Engine . EOM ; print "\n" ; exit (); ? > * This source code was highlighted with Source Code Highlighter .



  13. <? php @ Zend ; 3272 ; /* This is not a text file ! */ print "\n" ; print "\n" ; print "&# 38 ; lt ; h1 > Zend Optimizer not installed < /h1 > "; print "This file was encoded by the Zend Encoder / Zend SafeGuard Suite\n"; print "In order to run it, please install the freely available Zend Optimizer, version 2.1.0 or later.\n"; print " < h2 > What is the Zend Optimizer? < /h2 > "; print < < < EOM The Zend Optimizer is one of the most popular PHP plugins for performance-improvement , and has been freely available since the early days of PHP 4 . It improves performance by taking PHP ' s intermediate code through multiple Optimization Passes , which replace inefficient code patterns with efficient code blocks . The replacement code blocks perform exactly the same operations as the original code , only faster . In addition to performance-improvement , the Zend Optimizer also enables PHP to transparently load files encoded by the Zend Encoder or Zend SafeGuard Suite . The Zend Optimizer is a freely-available product from Zend Technologies . Zend Technologies is the company that develops the scripting engine of PHP , also known as the Zend Engine . EOM ; print "\n" ; exit (); ? > * This source code was highlighted with Source Code Highlighter .



  14. <? php @ Zend ; 3272 ; /* This is not a text file ! */ print "\n" ; print "\n" ; print "&# 38 ; lt ; h1 > Zend Optimizer not installed < /h1 > "; print "This file was encoded by the Zend Encoder / Zend SafeGuard Suite\n"; print "In order to run it, please install the freely available Zend Optimizer, version 2.1.0 or later.\n"; print " < h2 > What is the Zend Optimizer? < /h2 > "; print < < < EOM The Zend Optimizer is one of the most popular PHP plugins for performance-improvement , and has been freely available since the early days of PHP 4 . It improves performance by taking PHP ' s intermediate code through multiple Optimization Passes , which replace inefficient code patterns with efficient code blocks . The replacement code blocks perform exactly the same operations as the original code , only faster . In addition to performance-improvement , the Zend Optimizer also enables PHP to transparently load files encoded by the Zend Encoder or Zend SafeGuard Suite . The Zend Optimizer is a freely-available product from Zend Technologies . Zend Technologies is the company that develops the scripting engine of PHP , also known as the Zend Engine . EOM ; print "\n" ; exit (); ? > * This source code was highlighted with Source Code Highlighter .



  15. <? php @ Zend ; 3272 ; /* This is not a text file ! */ print "\n" ; print "\n" ; print "&# 38 ; lt ; h1 > Zend Optimizer not installed < /h1 > "; print "This file was encoded by the Zend Encoder / Zend SafeGuard Suite\n"; print "In order to run it, please install the freely available Zend Optimizer, version 2.1.0 or later.\n"; print " < h2 > What is the Zend Optimizer? < /h2 > "; print < < < EOM The Zend Optimizer is one of the most popular PHP plugins for performance-improvement , and has been freely available since the early days of PHP 4 . It improves performance by taking PHP ' s intermediate code through multiple Optimization Passes , which replace inefficient code patterns with efficient code blocks . The replacement code blocks perform exactly the same operations as the original code , only faster . In addition to performance-improvement , the Zend Optimizer also enables PHP to transparently load files encoded by the Zend Encoder or Zend SafeGuard Suite . The Zend Optimizer is a freely-available product from Zend Technologies . Zend Technologies is the company that develops the scripting engine of PHP , also known as the Zend Engine . EOM ; print "\n" ; exit (); ? > * This source code was highlighted with Source Code Highlighter .



  16. <? php @ Zend ; 3272 ; /* This is not a text file ! */ print "\n" ; print "\n" ; print "&# 38 ; lt ; h1 > Zend Optimizer not installed < /h1 > "; print "This file was encoded by the Zend Encoder / Zend SafeGuard Suite\n"; print "In order to run it, please install the freely available Zend Optimizer, version 2.1.0 or later.\n"; print " < h2 > What is the Zend Optimizer? < /h2 > "; print < < < EOM The Zend Optimizer is one of the most popular PHP plugins for performance-improvement , and has been freely available since the early days of PHP 4 . It improves performance by taking PHP ' s intermediate code through multiple Optimization Passes , which replace inefficient code patterns with efficient code blocks . The replacement code blocks perform exactly the same operations as the original code , only faster . In addition to performance-improvement , the Zend Optimizer also enables PHP to transparently load files encoded by the Zend Encoder or Zend SafeGuard Suite . The Zend Optimizer is a freely-available product from Zend Technologies . Zend Technologies is the company that develops the scripting engine of PHP , also known as the Zend Engine . EOM ; print "\n" ; exit (); ? > * This source code was highlighted with Source Code Highlighter .



  17. <? php @ Zend ; 3272 ; /* This is not a text file ! */ print "\n" ; print "\n" ; print "&# 38 ; lt ; h1 > Zend Optimizer not installed < /h1 > "; print "This file was encoded by the Zend Encoder / Zend SafeGuard Suite\n"; print "In order to run it, please install the freely available Zend Optimizer, version 2.1.0 or later.\n"; print " < h2 > What is the Zend Optimizer? < /h2 > "; print < < < EOM The Zend Optimizer is one of the most popular PHP plugins for performance-improvement , and has been freely available since the early days of PHP 4 . It improves performance by taking PHP ' s intermediate code through multiple Optimization Passes , which replace inefficient code patterns with efficient code blocks . The replacement code blocks perform exactly the same operations as the original code , only faster . In addition to performance-improvement , the Zend Optimizer also enables PHP to transparently load files encoded by the Zend Encoder or Zend SafeGuard Suite . The Zend Optimizer is a freely-available product from Zend Technologies . Zend Technologies is the company that develops the scripting engine of PHP , also known as the Zend Engine . EOM ; print "\n" ; exit (); ? > * This source code was highlighted with Source Code Highlighter .



  18. <? php @ Zend ; 3272 ; /* This is not a text file ! */ print "\n" ; print "\n" ; print "&# 38 ; lt ; h1 > Zend Optimizer not installed < /h1 > "; print "This file was encoded by the Zend Encoder / Zend SafeGuard Suite\n"; print "In order to run it, please install the freely available Zend Optimizer, version 2.1.0 or later.\n"; print " < h2 > What is the Zend Optimizer? < /h2 > "; print < < < EOM The Zend Optimizer is one of the most popular PHP plugins for performance-improvement , and has been freely available since the early days of PHP 4 . It improves performance by taking PHP ' s intermediate code through multiple Optimization Passes , which replace inefficient code patterns with efficient code blocks . The replacement code blocks perform exactly the same operations as the original code , only faster . In addition to performance-improvement , the Zend Optimizer also enables PHP to transparently load files encoded by the Zend Encoder or Zend SafeGuard Suite . The Zend Optimizer is a freely-available product from Zend Technologies . Zend Technologies is the company that develops the scripting engine of PHP , also known as the Zend Engine . EOM ; print "\n" ; exit (); ? > * This source code was highlighted with Source Code Highlighter .



<? php @ Zend ; 3272 ; /* This is not a text file ! */ print "\n" ; print "\n" ; print "&# 38 ; lt ; h1 > Zend Optimizer not installed < /h1 > "; print "This file was encoded by the Zend Encoder / Zend SafeGuard Suite\n"; print "In order to run it, please install the freely available Zend Optimizer, version 2.1.0 or later.\n"; print " < h2 > What is the Zend Optimizer? < /h2 > "; print < < < EOM The Zend Optimizer is one of the most popular PHP plugins for performance-improvement , and has been freely available since the early days of PHP 4 . It improves performance by taking PHP ' s intermediate code through multiple Optimization Passes , which replace inefficient code patterns with efficient code blocks . The replacement code blocks perform exactly the same operations as the original code , only faster . In addition to performance-improvement , the Zend Optimizer also enables PHP to transparently load files encoded by the Zend Encoder or Zend SafeGuard Suite . The Zend Optimizer is a freely-available product from Zend Technologies . Zend Technologies is the company that develops the scripting engine of PHP , also known as the Zend Engine . EOM ; print "\n" ; exit (); ? > * This source code was highlighted with Source Code Highlighter .







この部分は、Zend Optimizerがサーバーにインストールされていない場合に作成され、暗号化されたファイルをダウンロードするときに、システム管理者の変更を検討する時が来たことを世界中に知らせます:)。 しかし、私たちは他の何かにもっと惹かれました。 この神秘的な「@Zend」とは何ですか。 \ n 3272;”スクリプトの最初の行に? 3272が行で囲まれたバイト数であることが実験的に確立されています。「/ *これはテキストファイルではありません。 * / "And" exit(); "2倍。 同時に、タイプ「\ n」および「<<< EOM」の構造が1バイトで使用されます。 意味は明確ですか? Zend Optimizerブートローダーは、ファイルの先頭のN番目のバイト数をスキップし、暗号化されたバイトコードを実行します。



さらに、タスクは、このZend Encoderカーテンの代わりにメイン(「可視」)コードを配置し、メインの暗号化されたスクリプトの後に「可視」スクリプトを実行するローダーを作成するだけになりました。



結果は完全にシンプルなファイルでした:





  1. 関数 Secret(){
  2. //秘密関数
  3. }
  4. //「可視」スクリプトのローダー:
  5. $ script = "" ;
  6. $ file = file($ _ SERVER [ "script_FILENAME" ]);
  7. foreach ($ file as $ k => $ v){
  8. if ($ k> = 3){
  9. $スクリプト= $ v;
  10. if (substr($ v、0、7)== "exit();"break ;
  11. }
  12. }
  13. eval($スクリプト);
  14. 出る
*このソースコードは、 ソースコードハイライターで強調表示されました。




次に、このファイルを暗号化し、エンコーダスタブの代わりに必要なスクリプトを配置します。



ファイルの2行目(「@Zend」の後)でZend Optimizerの値を正しく設定するために、「可視」スクリプトのバイト数をカウントするだけです。 手動で計算するのは面倒だったので、2サイクルで別のスクリプトを作成しました。最初のサイクルでは、一定数のファイルコピーが異なる「ほぼ真の」バイト値で作成され、2番目ではこれらすべてのスクリプトがwgetでひっくり返りました。 正しい値を持つスクリプトは、500番目ではなく200番目の見出しを返します。



すべて準備完了です。 結果のファイルには、スクリプトの「可視」部分とバイトコードが含まれています。 サーバーがZend Optimizerモジュールで構成されている場合、スクリプトが呼び出されると、その暗号化された部分が最初に実行され、次に非表示にならない部分が実行されます。 いくつかの商業的なタスクでは、これは本当に非常に必要です。



All Articles