!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/apex_tdfonline/php/nucleo/lib/   drwxr-xr-x
Free 14.92 GB of 61.93 GB (24.1%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     toba_servicio_web_cliente_rest.php (2.15 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
require_once(toba::nucleo()->toba_dir(). '/php/3ros/guzzle/autoload.php');

class 
toba_servicio_web_cliente_rest extends toba_servicio_web_cliente
{
    protected 
$guzzle;
    
    function 
__construct($opciones$id_servicio$proyecto null
    {
        
parent::__construct($opciones$id_servicio$proyecto);
    }

    static function 
conectar($id_servicio$opciones=array(), $proyecto null)
    {
        if (! isset(
$proyecto)) {
            
$proyecto toba_editor::activado() ? toba_editor::get_proyecto_cargado() : toba::proyecto()->get_id();
        }
        
self::get_modelo_proyecto($proyecto);
        
$ini toba_modelo_rest::get_ini_cliente(self::$modelo_proyecto$id_servicio);

        
$opciones_ini $ini->get_datos_entrada('conexion');

        
//Convierte todos los '1' de texto en true
        
foreach (array_keys($opciones_ini) as $id_opcion) {
            if (
$opciones_ini[$id_opcion] === '1' || $opciones_ini[$id_opcion] === 1) {
                
$opciones_ini[$id_opcion] = true;
            }
        }

        
//-- Mezcla con las opciones recibidas y crea el objeto
        
$opciones array_merge($opciones_ini$opciones);

        if (! isset(
$opciones['to'])) {
            throw new 
toba_error_def("Debe indicar la URL destino en el campo 'to'");
        }

        
toba::logger()->debug("Invocando servicio $id_servicio. Opciones:<br>"var_export($opcionestrue));

        
$servicio = new toba_servicio_web_cliente_rest($opciones$id_servicio);

        return 
$servicio;
    }
    
    
/**
     * @return Guzzle\Service\Client
     */
    
function guzzle()
    {
        if (! isset(
$this->guzzle)) {
            
$this->guzzle = new Guzzle\Service\Client($this->opciones['to']);

            
//https://github.com/guzzle/guzzle/issues/120
            
$options $this->guzzle->getConfig()->get('curl.options');
            
$options['body_as_string'] = TRUE;
            
$this->guzzle->getConfig()->set('curl.options'$options);

            if (isset(
$this->opciones['auth_tipo'])) {
                
$this->guzzle->setDefaultOption('auth'
                        array(    
$this->opciones['auth_usuario'], 
                                
$this->opciones['auth_password'], 
                                
$this->opciones['auth_tipo']));
            }        
        }
        return 
$this->guzzle;    
    }

}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.6066 ]--