让Zend Engine输出opcodes码

Vulcan Logic Disassembler

The Vulcan Logic Disassembler hooks into the Zend Engine and dumps all the opcodes (execution units) of a script. It was written as as a beginning of an encoder, but I never got the time for that. It can be used to see what is going on in the Zend Engine.

VLD can not decrypt any encoded files.

If you have problems compiling or using this extension, please do not send me email about it. If you can't make it work then this tool is not for you. If you are certain there is a bug, then provide a patch.

New Features in 0.9
  • PHP 5.2 / PHP 5.3 support.
  • Some extra verbosity options (check the source to figure out which).
New Features in 0.8
  • PHP 5.0 / PHP 5.1 support.
  • vld will only show opcodes if the setting vld.active is set to 1.
New Features in 0.6
  • Class methods info is only dumped if they contain some user defined functions.
  • Clean up the framework for better opcode display.
  • Print extended value for function calls (# of args in that case).
  • Op code elements are only printed when they are actually used.

Download and Installation Instructions
The extension is not totally finished yet, but it works fine for me. If you have questions, feel free to send me an e-mail at derick at php dot net.

You can download the source here or get it from CVS. The CVS root is "srmread@cvs.vl-srm.net:/repository", the module is "vle" (not "vld") and the password is "srmread".

It's not hard to use this extension, but it might not work with all PHP versions. Here are the instructions to get it to work:

  1. Unpack the tarball: tar -xzf vld-0.9.1.tgz.
  2. cd into the newly created directory.
  3. Create the configure script: phpize
  4. Now run "./configure" followed by "make install".

That's it, if you now run PHP from the command line and add the -dvld.active=1 parameter VLD will spit out the opcodes:

php -dvld.active=1 program.php
http://derickrethans.nl/vld.php
posted @ 2009-06-28 11:14  已注销00021  阅读(264)  评论(0)    收藏  举报