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


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

/**
 * Class implementing the access checker function for the statistics module.
 *
 * @package simpleSAMLphp
 * @version $Id$
 */
class sspmod_statistics_AccessCheck {


    
/**
     * Check that the user has access to the statistics.
     *
     * If the user doesn't have access, send the user to the login page.
     */
    
public static function checkAccess(SimpleSAML_Configuration $statconfig) {
        
$protected $statconfig->getBoolean('protected'FALSE);
        
$authsource $statconfig->getString('auth'NULL);
        
$allowedusers $statconfig->getValue('allowedUsers'NULL);
        
$useridattr $statconfig->getString('useridattr''eduPersonPrincipalName');

        
$acl $statconfig->getValue('acl'NULL);
        if (
$acl !== NULL && !is_string($acl) && !is_array($acl)) {
            throw new 
SimpleSAML_Error_Exception('Invalid value for \'acl\'-option. Should be an array or a string.');
        }

        if (!
$protected) {
            return;
        }

        if (
SimpleSAML_Utilities::isAdmin()) {
            
// User logged in as admin. OK.
            
SimpleSAML_Logger::debug('Statistics auth - logged in as admin, access granted');
            return;
        }

        if (!isset(
$authsource)) {
            
// If authsource is not defined, init admin login.
            
SimpleSAML_Utilities::requireAdmin();
        }

        
/* We are using an authsource for login. */

        
$as = new SimpleSAML_Auth_Simple($authsource);
        
$as->requireAuth();

        
// User logged in with auth source.
        
SimpleSAML_Logger::debug('Statistics auth - valid login with auth source [' $authsource ']');

        
// Retrieving attributes
        
$attributes $as->getAttributes();

        if (!empty(
$allowedusers)) {
            
// Check if userid exists
            
if (!isset($attributes[$useridattr][0]))
                throw new 
Exception('User ID is missing');

            
// Check if userid is allowed access..
            
if (in_array($attributes[$useridattr][0], $allowedusers)) {
                
SimpleSAML_Logger::debug('Statistics auth - User granted access by user ID [' $attributes[$useridattr][0] . ']');
                return;
            }
            
SimpleSAML_Logger::debug('Statistics auth - User denied access by user ID [' $attributes[$useridattr][0] . ']');

        } else {
            
SimpleSAML_Logger::debug('Statistics auth - no allowedUsers list.');
        }

        if (!
is_null($acl)) {
            
$acl = new sspmod_core_ACL($acl);
            if (
$acl->allows($attributes)) {
                
SimpleSAML_Logger::debug('Statistics auth - allowed access by ACL.');
                return;
            }
            
SimpleSAML_Logger::debug('Statistics auth - denied access by ACL.');
        } else {
            
SimpleSAML_Logger::debug('Statistics auth - no ACL configured.');
        }

        throw new 
SimpleSAML_Error_Exception('Access denied to the current user.');
    }

}

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