V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
blues9
V2EX  ›  PHP

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

  •  
  •   blues9 · 2016-08-25 20:33:40 +08:00 · 2372 次点击
    这是一个创建于 2803 天前的主题,其中的信息可能已经有所发展或是发生改变。

    在 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" );
    	}
    

    .... ......

    2 条回复    2016-08-26 09:23:38 +08:00
    pubby
        1
    pubby  
       2016-08-25 21:24:26 +08:00
    $this->system = $system; // 这个 $system 哪来的?
    blues9
        2
    blues9  
    OP
       2016-08-26 09:23:38 +08:00
    @pubby

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

    加密后的代码我传到百度云盘上了,大家帮看看吧:
    https://pan.baidu.com/s/1kVAUDCz
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3101 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 14:03 · PVG 22:03 · LAX 07:03 · JFK 10:03
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.