!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.2.22 (Debian). PHP/5.6.36 

uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 

uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) 

Safe-mode: OFF (not secure)

/usr/share/roundcube/plugins/managesieve/tests/   drwxr-xr-x
Free 1.47 GB of 7.22 GB (20.3%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

class Parser extends PHPUnit_Framework_TestCase
{

    function 
setUp()
    {
        include_once 
dirname(__FILE__) . '/../lib/Roundcube/rcube_sieve_script.php';
    }

    
/**
     * Sieve script parsing
     *
     * @dataProvider data_parser
     */
    
function test_parser($input$output$message)
    {
        
// get capabilities list from the script
        
$caps = array();
        if (
preg_match('/require \[([a-z0-9", ]+)\]/'$input$m)) {
            foreach (
explode(','$m[1]) as $cap) {
                
$caps[] = trim($cap'" ');
            }
        }

        
$script = new rcube_sieve_script($input$caps);
        
$result $script->as_text();

        
$this->assertEquals(trim($result), trim($output), $message);
    }

    
/**
     * Data provider for test_parser()
     */
    
function data_parser()
    {
        
$dir_path realpath(dirname(__FILE__) . '/src');
        
$dir      opendir($dir_path);
        
$result   = array();

        while (
$file readdir($dir)) {
            if (
preg_match('/^[a-z0-9_]+$/'$file)) {
                
$input file_get_contents($dir_path '/' $file);

                if (
file_exists($dir_path '/' $file '.out')) {
                    
$output file_get_contents($dir_path '/' $file '.out');
                }
                else {
                    
$output $input;
                }

                
$result[] = array(
                    
'input'   => $input,
                    
'output'  => $output,
                    
'message' => "Error in parsing '$file' file",
                );
            }
        }

        return 
$result;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by PinoyWH1Z | C99Shell Github | Generation time: 0.011 ]--