Memanfaatkan BCompiler utk compile dan abfuscate Script PHP

15 Oktober 2009 at 11:22 am Tinggalkan komentar

Setelah menggunakan beberapa pilihan, berikut saya ulas mengenai langkah dalam melakukan comila dan obfuscate script PHP.

Bcompiler GUI merupakan aplikasi freeware yang dapat dimanfaatkan untuk melakukan compile dan obfuscate script PHP yang kita punya. prosesnya sangat sederhana dengan melakukan encode dan obfuscate script php, maka source code php kita sudah tidak bisa dibaca secara kasat mata oleh editor text.

Encode Bcompiler GUI menggunakan fungsi Bcompiler yang ada di PHP,  dengan mengcopy sourcenya dari PEAR. Dengan encoding ini, kita tdk perlu khawatir utk mendistribusikan aplikasi yang kita kembangkan dengan menggunakan PHP. Ada 2 Versi Bcompiler GUI yaitu linux dan windows. Isinya kurang lebih sama, dengan script php yang juga dapat kita unduh utk mengcompile dan obfuscate menggunakan fungsi Bcompiler.

Berikut adalah langkah-langkah instalasi dari alamat :

Requirements and first installation :
1) A webserver.
An easy solution is to use Xampp or Lampp

a)Windows : Just download and install xampp (the installer).
When the installation is done, you will find XAMPP under Start – Programs – XAMPP.
You can use the XAMPP Control Panel(xampp-control.exe) to start/stop all server and also install/uninstall services.
b) Linux : Download the tar.gz file.
Now run the command from the console :
sudo tar xvfz xampp-linux-1.7.tar.gz -C /opt
Start lampp with : sudo /opt/lampp/lampp start
Stop lampp with : sudo /opt/lampp/lampp stop

Now start apache and MySQL and test them by opening the browser at the address :
Hit the phpinfo() link in order to get important informations like the PHP version or just go with your browser at the address :

2) You have to enable bcompiler on your webserver.
By default is not enabled

a)Windows :

i)Install Xdebug
-Download Xdebug dll (notice that you have to know your PHP version from phpinfo)
-Open xampp\php\php.ini and make these changes :

;zend_extension_ts = “E:\YOUR_PATH\xampp\php\zendOptimizer\lib\ZendExtensionManager.dll”
;zend_extension_manager.optimizer_ts = “E:\YOUR_PATH\xampp\php\zendOptimizer\lib\Optimizer”
;zend_optimizer.enable_loader = 0
;;zend_optimizer.license_path =
;; Local Variables:
;; tab-width: 4
;; End:

;; Only Zend OR (!) XDebug

-Do the same thing at the file xampp\apache\bin\php.ini
By doing this we disable the Zend optimizer and we are using Xdebug instead.
-Put the php_xdebug.dll at the
If you have problems with apache (errors like dll not found) then you should download another version of xdebug.dll (always rename it to php_xdebug.dll) from
-Now stop and restart xampp (apache+MySQL).
Under http://localhost/xampp/phpinfo.php you should now find the xdebug.

ii)Install bcompiler
-Go to xampp\php\php.ini and uncomment :
-Do the same for the file xampp\apache\bin\php.ini
-Now stop and restart xampp (apache+MySQL).
Under http://localhost/xampp/phpinfo.php you should now find the bcompiler too.
-Now you are ready to use Bcompiler GUI under Windows!
b)Linux (Tested on Kubuntu) :
-Download and install these packets :
sudo apt-get install php5-dev
sudo apt-get install automake m4
sudo apt-get install libbz2-dev
sudo apt-get install re2c
sudo apt-get install php-pear

-Then do :
sudo pecl install bcompiler-0.8
bcompiler with this command should be compiled and inserted at this folder :
-Open the file
and write
in order to activate bcompiler
-Copy the
into the folder
-Open the file
and write
in order to activate bcompiler
-Now stop the server
sudo /opt/lampp/lampp stop
-Now start the server
sudo /opt/lampp/lampp start
-Under http://localhost/xampp/phpinfo.php
you should now find the bcompiler.

3) Firefox 3.
Is needed for launching the script CompileScript.php under Linux.
Under Windows Firefox is not needed but it is always recommended to have it.

How to use :
1) Start apache and MySQL
2) Select your webserver root . Must be something like
/opt/lampp/htdocs/ (under Linux)
c:\xampp\htdocs\ (under Windows)
3) Select your PHP project to compile (website root).
This must be under the webserver root for example :
/opt/lampp/htdocs/mysite (under Linux)
c:\xampp\htdocs\mysite (under Windows)
4) Select your PHP files that you want to compile.
By default they are all selected.
Note that the Compiled project will be generated at :
/opt/lampp/htdocs/mysiteCompiled (under Linux)
c:\xampp\htdocs\mysiteCompiled (under Windows)
Notice that under Linux you have to CHMOD 777 the /opt/lampp/htdocs/mysiteCompiled directory and all the underneath subirectories too.
5) Press the Compile button.
6) You are almost done.
If you get a series of warnings like :
Warning: fopen(index.php).
Just make sure that /opt/lampp/htdocs/mysiteCompiled is CHMOD 777 and then just reload the webpage with firefox.
The url should be something like that :
7) If you got a successfull compilation it is time to test your compiled site by going at :
(or just hit the link at the ‘all done’ page.)
8) If it everything alright then you must delete the CompileScript.php script.
9) All done !

Important Notes : :
The compiled version of your PHP product needs a webserver with bcompiler enabled.

Based On :
Bcompiler – A PHP bytecode Compiler

Whats new v.1.1 :
Problems with subpaths solved.
Now for example you can use as webpage root :
/opt/lampp/htdocs/test/mysiteCompiled (under Linux)
c:\xampp\htdocs\test\mysiteCompiled (under Windows)
Better interface (more intuitive)
Fixed some smaller Bugs
Whats new v.1.0 :
First official and public release.

Bcompiler GUI screenshot

Entry filed under: php.

Invite friends otomatis Encoding php dgn memanfaatkan monas

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:


You are commenting using your account. Logout /  Ubah )

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )


Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed

Twitter Jhoni




Oktober 2009
« Sep   Nov »

%d blogger menyukai ini: