!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)

/opt/alt/php55/usr/share/pear/Symfony/Component/Security/Core/Util/   drwxr-xr-x
Free 294.17 GB of 429.69 GB (68.46%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Security\Core\Util;

use 
Psr\Log\LoggerInterface;

/**
 * A secure random number generator implementation.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 * @author Johannes M. Schmitt <schmittjoh@gmail.com>
 */
final class SecureRandom implements SecureRandomInterface
{
    private 
$logger;
    private 
$useOpenSsl;
    private 
$seed;
    private 
$seedUpdated;
    private 
$seedLastUpdatedAt;
    private 
$seedFile;

    
/**
     * Constructor.
     *
     * Be aware that a guessable seed will severely compromise the PRNG
     * algorithm that is employed.
     *
     * @param string          $seedFile
     * @param LoggerInterface $logger
     */
    
public function __construct($seedFile nullLoggerInterface $logger null)
    {
        
$this->seedFile $seedFile;
        
$this->logger $logger;

        
// determine whether to use OpenSSL
        
if (defined('PHP_WINDOWS_VERSION_BUILD') && version_compare(PHP_VERSION'5.3.4''<')) {
            
$this->useOpenSsl false;
        } elseif (!
function_exists('openssl_random_pseudo_bytes')) {
            if (
null !== $this->logger) {
                
$this->logger->notice('It is recommended that you enable the "openssl" extension for random number generation.');
            }
            
$this->useOpenSsl false;
        } else {
            
$this->useOpenSsl true;
        }
    }

    
/**
     * {@inheritdoc}
     */
    
public function nextBytes($nbBytes)
    {
        
// try OpenSSL
        
if ($this->useOpenSsl) {
            
$bytes openssl_random_pseudo_bytes($nbBytes$strong);

            if (
false !== $bytes && true === $strong) {
                return 
$bytes;
            }

            if (
null !== $this->logger) {
                
$this->logger->info('OpenSSL did not produce a secure random number.');
            }
        }

        
// initialize seed
        
if (null === $this->seed) {
            if (
null === $this->seedFile) {
                throw new \
RuntimeException('You need to specify a file path to store the seed.');
            }

            if (
is_file($this->seedFile)) {
                list(
$this->seed$this->seedLastUpdatedAt) = $this->readSeed();
            } else {
                
$this->seed uniqid(mt_rand(), true);
                
$this->updateSeed();
            }
        }

        
$bytes '';
        while (
strlen($bytes) < $nbBytes) {
            static 
$incr 1;
            
$bytes .= hash('sha512'$incr++.$this->seed.uniqid(mt_rand(), true).$nbBytestrue);
            
$this->seed base64_encode(hash('sha512'$this->seed.$bytes.$nbBytestrue));
            
$this->updateSeed();
        }

        return 
substr($bytes0$nbBytes);
    }

    private function 
readSeed()
    {
        return 
json_decode(file_get_contents($this->seedFile));
    }

    private function 
updateSeed()
    {
        if (!
$this->seedUpdated && $this->seedLastUpdatedAt time() - mt_rand(110)) {
            
file_put_contents($this->seedFilejson_encode(array($this->seedmicrotime(true))));
        }

        
$this->seedUpdated true;
    }
}

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