zend guard 加密的文件解密后的奇怪问题

2016-08-25 20:33:40 +08:00
 blues9

在 Debug 一个问题,原有系统是 shopex ,代码是加密的,没法调试,在 showmycode 那个网站可以解密,但是解密之后的文件运行有问题,感觉不应该是解密的问题,但也想不出还有什么不对的。。。

错误信息: PHP Fatal error: Call to a member function base_url() on a non-object

出错的代码在下面构造函数中:

public function mdl_storager( )
{
    $this->system = $system;
    $this->base_url = $this->system->base_url( );
    $this->class_name = defined( "WITH_STORAGER" ) ? constant( "WITH_STORAGER" ) : "fs_storage";
    require_once( PLUGIN_DIR."/functions/".$this->class_name.".php" );
    $this->worker = new $this->class_name( );
    if ( defined( "HOST_MIRRORS" ) )
    {
        $host_mirrors = preg_split( "/[,\\s]+/", constant( "HOST_MIRRORS" ) );
        if ( is_array( $host_mirrors ) && isset( $host_mirrors[0] ) )
        {
            $this->host_mirrors =& $host_mirrors;
            $this->host_mirrors_count = count( $host_mirrors ) - 1;
        }
    }
}

上面的 modoel 是从这里引用的:

public function save( $brand_id, $aData )
{
	$storager =& $this->system->loadModel( "system/storager" );
	$oTemplate = $this->system->loadModel( "system/template" );
	if ( $_FILES )
	{
		$aData['brand_logo'] = $storager->save_upload( $_FILES['brand_logo'], "brand" );
	}

.... ......

2381 次点击
所在节点    PHP
2 条回复
pubby
2016-08-25 21:24:26 +08:00
$this->system = $system; // 这个 $system 哪来的?
blues9
2016-08-26 09:23:38 +08:00
@pubby

解密出来就是这样子。。我也很奇怪,对 php 了解不多,难道有什么特殊的注入机制?还是解密出了问题?

加密后的代码我传到百度云盘上了,大家帮看看吧:
https://pan.baidu.com/s/1kVAUDCz

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/301776

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX