!C99Shell v. 1.0 pre-release build #13!

Software: Apache. PHP/5.5.15 

uname -a: Windows NT SVR-DMZ 6.1 build 7600 (Windows Server 2008 R2 Enterprise Edition) i586 

SYSTEM 

Safe-mode: OFF (not secure)

C:\cumbreclima\wp-content\plugins\w3-total-cache\lib\Minify\Minify\   drwxrwxrwx
Free 4.11 GB of 39.52 GB (10.4%)
Detected drives: [ a ] [ c ] [ d ] [ e ] [ f ]
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     YUICompressor.php (3.91 KB)      -rw-rw-rw-
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

class Minify_YUICompressor {
    protected static 
$_pathJava 'java';
    protected static 
$_pathJar 'yuicompressor.jar';

    public static function 
minifyJs($js$options = array()) {
        return 
self::_minify('js'$js$options);
    }

    public static function 
minifyCss($css$options = array()) {
        
w3_require_once(W3TC_LIB_MINIFY_DIR '/Minify/CSS/UriRewriter.php');

        
$css self::_minify('css'$css$options);
        
$css Minify_CSS_UriRewriter::rewrite($css$options);

        return 
$css;
    }

    public static function 
testJs(&$error) {
        try {
            
Minify_YUICompressor::minifyJs('alert("ok");');
            
$error 'OK';

            return 
true;
        } catch (
Exception $exception) {
            
$error $exception->getMessage();

            return 
false;
        }
    }

    public static function 
testCss(&$error) {
        try {
            
Minify_YUICompressor::minifyCss('p{color:red}');
            
$error 'OK';

            return 
true;
        } catch (
Exception $exception) {
            
$error $exception->getMessage();

            return 
false;
        }
    }

    public static function 
setPathJava($pathJava) {
        
self::$_pathJava $pathJava;
    }

    public static function 
setPathJar($pathJar) {
        
self::$_pathJar $pathJar;
    }

    protected static function 
_minify($type$content$options) {
        
$output null;

        
self::_execute($type$options$content$output);

        return 
$output;
    }

    protected static function 
_execute($type$options$input, &$output) {
        
$cmd self::_getCmd($type$options);
        
$return self::_run($cmd$input$output);

        return 
$return;
    }

    protected static function 
_getCmd($type$options) {
        if (!
is_file(self::$_pathJava)) {
            throw new 
Exception(sprintf('JAVA executable (%s) is not a valid file.'self::$_pathJava));
        }

        if (!
is_file(self::$_pathJar)) {
            throw new 
Exception(sprintf('JAR file (%s) is not a valid file.'self::$_pathJar));
        }

        
$options array_merge(array(
            
'line-break' => 5000,
            
'type' => $type,
            
'nomunge' => false,
            
'preserve-semi' => false,
            
'disable-optimizations' => false
        
), $options);

        
$optionsString '';

        foreach (
$options as $option => $value) {
            switch (
$option) {
                case 
'charset':
                case 
'line-break':
                case 
'type':
                    if (
$value) {
                        
$optionsString .= sprintf('--%s %s '$option$value);
                    }
                    break;

                case 
'nomunge':
                case 
'preserve-semi':
                case 
'disable-optimizations':
                    if (
$value) {
                        
$optionsString .= sprintf('--%s '$option);
                    }
                    break;
            }
        }

        
$cmd sprintf('%s -jar %s %s'self::$_pathJavaescapeshellarg(self::$_pathJar), $optionsString);

        return 
$cmd;
    }

    protected static function 
_run($cmd$input, &$output) {
        
$descriptors = array(
            
=> array('pipe''r'),
            
=> array('pipe''w'),
            
=> array('pipe''w')
        );

        
$pipes null;
        
$process proc_open($cmd$descriptors$pipes);

        if (!
$process) {
            throw new 
Exception(sprintf('Unable to open process (%s).'$cmd));
        }

        
fwrite($pipes[0], $input);
        
fclose($pipes[0]);

        
$output stream_get_contents($pipes[1]);
        
fclose($pipes[1]);

        
$error stream_get_contents($pipes[2]);
        
fclose($pipes[2]);

        
$return proc_close($process);

        if (
$return != 0) {
            throw new 
Exception(sprintf('Command (%s) execution failed. Error: %s. Return code: %d.'$cmd$error$return));
        }

        return 
$return;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0312 ]--