2013-06-19 35 views
0

有没有一种方法可以在使用Zend Guard编码的源代码树中查找PHP文件?查找使用Zend Guard编码的PHP文件

existingquestions约试图解码的Zend编码的文件,但我继承必须某处在一些偏远的图书馆,因为我不断收到在我的应用程序下面的输出使用Zend的编码文件的大型PHP应用程序错误日志:

//Copyright UserScape, Inc. 2005-2008 

<html><body> 
<a href="http://www.zend.com/products/zend_guard"> 
<img border="0" src="http://www.zend.com/images/store/safeguard_optimizer_img.gif" align="right"> 
</a> 
<center><h1>Zend Optimizer not installed</h1></center> 
<p>This file was encoded by the 
<a href="http://www.zend.com/products/zend_guard">Zend Guard</a>. 
In order to run it, please install the 
<a href="http://www.zend.com/products/zend_optimizer">Zend Optimizer</a> 
(available without charge), version 3.0.0 or later. </p> 
<h2>Seeing this message instead of the website you expected?</h2> 
This means that this webserver is not configured correctly. 
In order to view this website properly, please contact the 
website's system administrator/webmaster with the following 
message:<br><br> 
<tt>The component "Zend Optimizer" is not installed on the 
Web Server and therefore cannot service encoded files. 
Please download and install the Zend Optimizer (available 
without charge) on the Web Server.</tt><br><br> 
<b>Note</b>: Zend Technologies cannot resolve issues related 
to this message appearing on websites not belonging to 
<a href="http://www.zend.com">Zend Technologies</a>. 
<h2>What is the Zend Optimizer?</h2> 
<p>The Zend Optimizer is one of the most popular PHP plugins 
for performance-improvement, and has been available without 
charge, since the early days of PHP 4. It improves performance 
by scanning PHP's intermediate code and passing it through 
multiple Optimization Passes to replace inefficient code 
patterns with more efficient code blocks. The replaced code 
blocks perform exactly the same operations as the original 
code, only faster. </p> 
<p>In addition to improving performance, the Zend Optimizer 
also enables PHP to transparently load files encoded by the 
Zend Guard. </p> 
<p>The Zend Optimizer is a free product available for download 
from <a href="http://www.zend.com">Zend Technologies</a>. 
Zend Technologies also developed the PHP scripting engine, 
known as the <a href="http://www.zend.com/products/zend_engine">Zend Engine</a>.</p> 
</body></html> 

没有知道哪里该文件是在应用程序!我一直无法找到Zend Guard编码的文件的特征信息,所以我不知道该如何搜索文件系统。 Google一直没有帮助。简单grep s为“userscape”“helpspot”(显然是UserScape的产品),甚至“zend”空白。

编辑:但是,根据the FAQ Zend Guard使用public key crypto,所以我相当肯定这些文件无论如何不会有任何可识别的PHP代码。


有没有找到文件系统中的Zend的卫队编码的PHP文件通用方式?有可搜索文件的常见属性吗?

+0

不知道它是如何混淆文件,我不能确定,但​​我会建议greaps的东西,如'eval','preg_replace/e'和'base64_decode' – andrewsi

+0

好的想法,不幸的' eval'只返回一大堆[SimpleTest](http://www.simpletest.org/)和Javascript命中。 – beporter

+0

你和其他人有什么关系吗?你也可以做一些像'grep -r eval * | grep php'递归查找包含'eval'的文件,然后grep php的结果 - 这可能有助于跳过javascript。 – andrewsi

回答

1

我相信大多数Zend Optimizer的编码的文件将与头开始类似:

<?php @Zend; 

他们也将包含所有你看到错误消息,包括单词“Zend Optimizer的”文本。所以你可以只搜索一下。 :)

+0

这个问题已经表明,项目范围内的“zend”搜索没有结果。搜索“@Zend”同样不会返回结果。你能指出Zend编码文件的任何公开示例来证实你的断言吗? – beporter

+0

@beporter:[这是一个例子](https://gist.github.com/duskwuff/080b474bf423a4a0b852)。 ([源](http://www.webhostingtalk.com/showthread.php?t=485880)) – duskwuff

+0

是的,这确实看起来很像我看到日志的输出。无奈之下,我在服务器的整个文件系统上运行grep,并在完全不同的Apache vhost文件夹中找到“helpspot”文件!这解决了这个问题,但这些文件如何将条目添加到我的应用程序日志中仍然是个谜(当然,这是一个完全不同的问题)。谢谢! – beporter