!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_led/php/vendor/ircmaxell/random-lib/lib/RandomLib/   drwxrwxr-x
Free 15.64 GB of 61.93 GB (25.25%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     AbstractMixer.php (4.35 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/*
 * The RandomLib library for securely generating random numbers and strings in PHP
 *
 * @author     Anthony Ferrara <ircmaxell@ircmaxell.com>
 * @copyright  2011 The Authors
 * @license    http://www.opensource.org/licenses/mit-license.html  MIT License
 * @version    Build @@version@@
 */

/**
 * An abstract mixer to implement a common mixing strategy
 *
 * PHP version 5.3
 *
 * @category  PHPSecurityLib
 * @package   Random
 *
 * @author    Anthony Ferrara <ircmaxell@ircmaxell.com>
 * @copyright 2011 The Authors
 * @license    http://www.opensource.org/licenses/mit-license.html  MIT License
 *
 * @version   Build @@version@@
 */
namespace RandomLib;

use 
SecurityLib\Util;

/**
 * An abstract mixer to implement a common mixing strategy
 *
 * @see      http://tools.ietf.org/html/rfc4086#section-5.2
 *
 * @category PHPSecurityLib
 * @package  Random
 *
 * @author   Anthony Ferrara <ircmaxell@ircmaxell.com>
 */
abstract class AbstractMixer implements \RandomLib\Mixer
{

    
/**
     * Get the block size (the size of the individual blocks used for the mixing)
     *
     * @return int The block size
     */
    
abstract protected function getPartSize();

    
/**
     * Mix 2 parts together using one method
     *
     * @param string $part1 The first part to mix
     * @param string $part2 The second part to mix
     *
     * @return string The mixed data
     */
    
abstract protected function mixParts1($part1$part2);

    
/**
     * Mix 2 parts together using another different method
     *
     * @param string $part1 The first part to mix
     * @param string $part2 The second part to mix
     *
     * @return string The mixed data
     */
    
abstract protected function mixParts2($part1$part2);

    
/**
     * Mix the provided array of strings into a single output of the same size
     *
     * All elements of the array should be the same size.
     *
     * @param array $parts The parts to be mixed
     *
     * @return string The mixed result
     */
    
public function mix(array $parts)
    {
        if (empty(
$parts)) {
            return 
'';
        }
        
$len        Util::safeStrlen($parts[0]);
        
$parts      $this->normalizeParts($parts);
        
$stringSize count($parts[0]);
        
$partsSize  count($parts);
        
$result     '';
        
$offset     0;
        for (
$i 0$i $stringSize$i++) {
            
$stub $parts[$offset][$i];
            for (
$j 1$j $partsSize$j++) {
                
$newKey $parts[($j $offset) % $partsSize][$i];
                
//Alternately mix the output for each source
                
if ($j == 1) {
                    
$stub ^= $this->mixParts1($stub$newKey);
                } else {
                    
$stub ^= $this->mixParts2($stub$newKey);
                }
            }
            
$result .= $stub;
            
$offset  = ($offset 1) % $partsSize;
        }

        return 
Util::safeSubstr($result0$len);
    }

    
/**
     * Normalize the part array and split it block part size.
     *
     * This will make all parts the same length and a multiple
     * of the part size
     *
     * @param array $parts The parts to normalize
     *
     * @return array The normalized and split parts
     */
    
protected function normalizeParts(array $parts)
    {
        
$blockSize $this->getPartSize();
        
$callback  = function ($value) {
            return 
Util::safeStrlen($value);
        };
        
$maxSize max(array_map($callback$parts));
        if (
$maxSize $blockSize != 0) {
            
$maxSize += $blockSize - ($maxSize $blockSize);
        }
        foreach (
$parts as &$part) {
            
$part $this->str_pad($part$maxSizechr(0));
            
$part str_split($part$blockSize);
        }

        return 
$parts;
    }

    private function 
str_pad($string$size$character)
    {
        
$start Util::safeStrlen($string);
        
$inc Util::safeStrlen($character);
        for (
$i $start$i $size$i+= $inc) {
            
$string $string $character;
        }

        return 
Util::safeSubstr($string0$size);
    }

    private function 
str_split($string$size)
    {
        
$blocks = array();
        
$length Util::safeStrlen($string);
        
$parts ceil($length $size);
        for (
$i 0$i $parts$i++) {
            
$blocks[] = Util::safeSubstr($string$i $length$length);
        }

        return 
$blocks;
    }
}

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