!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/lib/Saml/   drwxrwxr-x
Free 15.68 GB of 61.93 GB (25.32%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

/**
 * Determine if the SAML response is valid using a provided x509 certificate.
 */
class OneLogin_Saml_XmlSec
{
    
/**
     * A SamlResponse class provided to the constructor.
     * @var OneLogin_Saml_Settings
     */
    
protected $_settings;

    
/**
     * The document to be tested.
     * @var DomDocument
     */
    
protected $_document;

    
/**
     * Construct the SamlXmlSec object.
     *
     * @param OneLogin_Saml_Settings $settings A SamlResponse settings object containing the necessary
     *                                          x509 certicate to test the document.
     * @param OneLogin_Saml_Response $response The document to test.
     */
    
public function __construct(OneLogin_Saml_Settings $settingsOneLogin_Saml_Response $response)
    {
        
$this->_settings $settings;
        
$this->_document = clone $response->document;
    }

    
/**
     * Verify that the document only contains a single Assertion
     *
     * @return bool TRUE if the document passes.
     */
    
public function validateNumAssertions()
    {
        
$rootNode $this->_document;
        
$assertionNodes $rootNode->getElementsByTagName('Assertion');
        return (
$assertionNodes->length == 1);
    }

    
/**
     * Verify that the document is still valid according
     *
     * @return bool
     */
    
public function validateTimestamps()
    {
        
$rootNode $this->_document;
        
$timestampNodes $rootNode->getElementsByTagName('Conditions');
        for (
$i 0$i $timestampNodes->length$i++) {
            
$nbAttribute $timestampNodes->item($i)->attributes->getNamedItem("NotBefore");
            
$naAttribute $timestampNodes->item($i)->attributes->getNamedItem("NotOnOrAfter");
            if (
$nbAttribute && strtotime($nbAttribute->textContent) > time()) {
                return 
false;
            }
            if (
$naAttribute && strtotime($naAttribute->textContent) <= time()) {
                return 
false;
            }
        }
        return 
true;
    }

    
/**
     * @return bool
     * @throws Exception
     */
    
public function isValid()
    {
        
$singleAssertion $this->validateNumAssertions();
        if (!
$singleAssertion) {
            throw new 
Exception('Multiple assertions are not supported');
        }

        
$validTimestamps $this->validateTimestamps();
        if (!
$validTimestamps) {
            throw new 
Exception('Timing issues (please check your clock settings)');
        }

        
$objXMLSecDSig = new XMLSecurityDSig();

        
$objDSig $objXMLSecDSig->locateSignature($this->_document);
        if (!
$objDSig) {
            throw new 
Exception('Cannot locate Signature Node');
        }
        
$objXMLSecDSig->canonicalizeSignedInfo();
        
$objXMLSecDSig->idKeys = array('ID');

        
$objKey $objXMLSecDSig->locateKey();
        if (!
$objKey) {
            throw new 
Exception('We have no idea about the key');
        }

        try {
            
$retVal $objXMLSecDSig->validateReference();
        }
        catch (
Exception $e) {
            throw new 
Exception('Reference Validation Failed');
        }

        
XMLSecEnc::staticLocateKeyInfo($objKey$objDSig);

        
$objKey->loadKey($this->_settings->idpPublicCertificatefalsetrue);

        return (
$objXMLSecDSig->verify($objKey) === 1);
    }
}

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