Zend-Decoder:还原ZendGuard处理后的php代码
https://github.com/Tools2/Zend-Decoder
项目描述
Zend-Decoder
支持php5.6 zend解密,其他版本未测。
编译 xcache
Ubuntu + php5.6:
$ sudo apt-get install python-software-properties
$ sudo add-apt-repository ppa:ondrej/php
$ sudo apt-get update
$ apt-get install php5.6-dev
$ git clone https://github.com/lighttpd/xcache
$ cd xcache
$ patch -p1 < ../xcache.patch
$ phpize
$ ./configure --enable-xcache-disassembler
$ make
编译参考
windows + php5.6
如何编译
使用
修改php.ini
extension=xcache.so
zend_extension = ZendGuardLoader.so
或
extension=xcache.dll
zend_extension = ZendGuardLoader.dll
解码
php index.php encode.php
或
php index2.php encode.php
反编译文件xcache/lib/Decompiler.class.php
phpdc.phpr如下
#! /usr/bin/php -dopen_basedir= <?php // you should write your own phpdc.phpr file if you want to do batch decompile // using glob and/or Recursive Directory Iterator $srcdir = dirname(__FILE__); require_once("$srcdir/../lib/Decompiler.class.php"); if (file_exists("$srcdir/phpdc.debug.php")) { include("$srcdir/phpdc.debug.php"); } if (!isset($argv)) { $argv = $_SERVER['argv']; } $inputType = 'php'; $outputTypes = array(); $files = array(); reset($argv); while (($arg = next($argv)) !== false) { switch ($arg) { case '-h': echo "Usage: phpdc.phpr [-dca] [filename]", PHP_EOL; echo " -c: decompile into PHP code", PHP_EOL; echo " -d: dump into opcode", PHP_EOL; echo " -a: input file is dasm opcode return from xcache_dasm_*", PHP_EOL; echo " -h: this help page", PHP_EOL; exit(); break; case '-c': $outputTypes[] = 'php'; break; case '-d': $outputTypes[] = 'opcode'; break; case '--': break 2; case '-a': $inputType = 'opcode'; break; default: $files[] = $arg; break; } } if ($outputTypes) { $outputTypes = array_unique($outputTypes); } else { $outputTypes[] = 'php'; } if (!$files) { $phpcode = ''; if (!defined('stdin')) { define('stdin', fopen('php://stdin', 'rb')); } while (!feof(stdin)) { $phpcode .= fgets(stdin); } $dc = new Decompiler($outputTypes); if ($dc->decompileString($phpcode) === false) { exit(2); } $dc->output(); } else { foreach ($files as $file) { $dc = new Decompiler($outputTypes); switch ($inputType) { case 'opcode': eval('$opcode = ' . file_get_contents($file) . ';'); if ($dc->decompileDasm($opcode) === false) { exit(2); } break; case 'php'; if ($dc->decompileFile($file) === false) { exit(2); } break; } $dc->output(); } }
执行命令:php.exe -c php.ini phpdc.phpr en_test.php equal ZEND_JMP 1
SG11解码SourceGuardian解密,sg11解密,IC10解密
SourceGuardian 11加密 ,SG111
IC10 PHP5.3-7.4 各版本!
本文链接:http://78moban.cn/post/9313.html
版权声明:站内所有文章皆来自网络转载,只供模板演示使用,并无任何其它意义!
上一篇:微擎小程序前端后端安装教程
下一篇:OPCODE的功能列表