!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_led/php/vendor/onelogin/php-saml/tests/src/OneLogin/Saml/   drwxrwxr-x
Free 15.64 GB of 61.93 GB (25.26%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     ResponseTest.php (3.89 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

class OneLogin_Saml_ResponseTest extends PHPUnit_Framework_TestCase
{
    private 
$_settings;

    public function 
setUp()
    {
        
$this->_settings = new OneLogin_Saml_Settings;

        
$settingsDir TEST_ROOT .'/settings/';
        include 
$settingsDir.'settings1.php';

        
$this->_settings->spIssuer $settingsInfo['sp']['entityId'];
        
$this->_settings->spReturnUrl $settingsInfo['sp']['assertionConsumerService']['url'];
        
$this->_settings->idpSingleSignOnUrl $settingsInfo['idp']['singleSignOnService']['url'];
        
$this->_settings->idpSingleLogOutUrl $settingsInfo['idp']['singleLogoutService']['url'];

        
$cert $settingsInfo['idp']['x509cert'];

        
$x509cert str_replace(array("\x0D""\r""\n"), ""$cert);
        if (!empty(
$x509cert)) {
            
$x509cert str_replace('-----BEGIN CERTIFICATE-----'""$x509cert);
            
$x509cert str_replace('-----END CERTIFICATE-----'""$x509cert);
            
$x509cert str_replace(' '''$x509cert);
            
            
$x509cert "-----BEGIN CERTIFICATE-----\n".chunk_split($x509cert64"\n")."-----END CERTIFICATE-----\n";
        }

        
$this->_settings->idpPublicCertificate $x509cert;
    }

    public function 
testReturnNameId()
    {
        
$xml file_get_contents(TEST_ROOT '/data/responses/response1.xml.base64');
        
$response = new OneLogin_Saml_Response($this->_settings$xml);

        
$this->assertEquals('support@onelogin.com'$response->getNameId());

        
$this->assertEquals('support@onelogin.com'$response->get_nameid());
    }

    public function 
testGetAttributes()
    {
        
$xml file_get_contents(TEST_ROOT '/data/responses/response1.xml.base64');
        
$response = new OneLogin_Saml_Response($this->_settings$xml);

        
$expectedAttributes = array(
            
'uid' => array(
                
'demo'
            
),
            
'another_value' => array(
                
'value'
            
),
        );
        
$this->assertEquals($expectedAttributes$response->getAttributes());

        
$this->assertEquals($response->getAttributes(), $response->get_saml_attributes());

        
// An assertion that has no attributes should return an empty array when asked for the attributes
        
$assertion file_get_contents(TEST_ROOT '/data/responses/response2.xml.base64');
        
$response = new OneLogin_Saml_Response($this->_settings$assertion);

        
$this->assertEmpty($response->getAttributes());
    }

    public function 
testOnlyRetrieveAssertionWithIDThatMatchesSignatureReference()
    {
        
$xml file_get_contents(TEST_ROOT '/data/responses/wrapped_response_2.xml.base64');
        
$response = new OneLogin_Saml_Response($this->_settings$xml);
        try {
            
$nameId $response->getNameId();
            
$this->assertNotEquals('root@example.com'$nameId);
        } catch (
Exception $e) {
            
$this->assertNotEmpty($e->getMessage(), 'Trying to get NameId on an unsigned assertion fails');
        }
    }

    public function 
testDoesNotAllowSignatureWrappingAttack()
    {
        
$xml file_get_contents(TEST_ROOT '/data/responses/response4.xml.base64');
        
$response = new OneLogin_Saml_Response($this->_settings$xml);

        
$this->assertEquals('test@onelogin.com'$response->getNameId());
    }

    public function 
testGetSessionNotOnOrAfter()
    {
        
$xml file_get_contents(TEST_ROOT '/data/responses/response1.xml.base64');
        
$response = new OneLogin_Saml_Response($this->_settings$xml);

        
$this->assertEquals(1290203857$response->getSessionNotOnOrAfter());
        
        
// An assertion that do not specified Session timeout should return NULL
        
        
$xml file_get_contents(TEST_ROOT '/data/responses/response2.xml.base64');
        
$response = new OneLogin_Saml_Response($this->_settings$xml);

        
$this->assertNull($response->getSessionNotOnOrAfter());
    }
}

:: 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.2812 ]--