!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/security-lib/lib/SecurityLib/   drwxrwxr-x
Free 11.48 GB of 61.93 GB (18.54%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

/**
 * A Utility class for converting between raw binary strings and a given
 * list of characters
 *
 * PHP version 5.3
 *
 * @category   PHPSecurityLib
 * @package    Core
 * @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 SecurityLib;

/**
 * A Utility class for converting between raw binary strings and a given
 * list of characters
 *
 * @category   PHPSecurityLib
 * @package    Core
 * @author     Anthony Ferrara <ircmaxell@ircmaxell.com>
 */
class BaseConverter {

    
/**
     * Convert from a raw binary string to a string of characters
     *
     * @param string $string     The string to convert from
     * @param string $characters The list of characters to convert to
     *
     * @return string The converted string
     */
    
public static function convertFromBinary($string$characters) {
        if (
$string === '' || empty($characters)) {
            return 
'';
        }
        
$string   str_split($string);
        
$callback = function($str) {
                return 
ord($str);
            };
        
$string    array_map($callback$string);
        
$converted = static::baseConvert($string256strlen($characters));
        
$callback  = function ($num) use ($characters) {
                return 
$characters[$num];
            };
        
$ret implode(''array_map($callback$converted));
        return 
$ret;
    }

    
/**
     * Convert to a raw binary string from a string of characters
     *
     * @param string $string     The string to convert from
     * @param string $characters The list of characters to convert to
     *
     * @return string The converted string
     */
    
public static function convertToBinary($string$characters) {
        if (empty(
$string) || empty($characters)) {
            return 
'';
        }
        
$string   str_split($string);
        
$callback = function($str) use ($characters) {
                return 
strpos($characters$str);
            };
        
$string    array_map($callback$string);
        
$converted = static::baseConvert($stringstrlen($characters), 256);
        
$callback  = function ($num) {
                return 
chr($num);
            };
        return 
implode(''array_map($callback$converted));
    }

    
/**
     * Convert an array of input blocks to another numeric base
     *
     * This function was modified from an implementation found on StackOverflow.
     * Special Thanks to @KeithRandall for supplying the implementation.
     *
     * @param int[] $source  The source number, as an array
     * @param int   $srcBase The source base as an integer
     * @param int   $dstBase The destination base as an integer
     *
     * @see http://codegolf.stackexchange.com/questions/1620/arb/1626#1626
     * @return int[] An array of integers in the encoded base
     */
    
public static function baseConvert(array $source$srcBase$dstBase) {
        if (
$dstBase 2) {
            
$message sprintf('Invalid Destination Base: %d'$dstBase);
            throw new \
InvalidArgumentException($message);
        }
        
$result = array();
        
$count  count($source);
        while (
$count) {
            
$itMax     $count;
            
$remainder $count $loop 0;
            while(
$loop $itMax) {
                
$dividend  $source[$loop++] + $remainder $srcBase;
                
$remainder $dividend $dstBase;
                
$res       = ($dividend $remainder) / $dstBase;
                if (
$count || $res) {
                    
$source[$count++] = $res;
                }
            }
            
$result[] = $remainder;
        }
        return 
array_reverse($result);
    }

}

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