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

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/laravel-crm/vendor/laravel/framework/src/Illuminate/Validation/Rules/   drwxrwxrwx
Free 13.19 GB of 57.97 GB (22.75%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Illuminate\Validation\Rules;

use 
Illuminate\Contracts\Validation\Rule;
use 
Illuminate\Contracts\Validation\ValidatorAwareRule;
use 
Illuminate\Support\Arr;
use 
Illuminate\Support\Traits\Conditionable;
use 
TypeError;

class 
Enum implements RuleValidatorAwareRule
{
    use 
Conditionable;

    
/**
     * The type of the enum.
     *
     * @var string
     */
    
protected $type;

    
/**
     * The current validator instance.
     *
     * @var \Illuminate\Validation\Validator
     */
    
protected $validator;

    
/**
     * The cases that should be considered valid.
     *
     * @var array
     */
    
protected $only = [];

    
/**
     * The cases that should be considered invalid.
     *
     * @var array
     */
    
protected $except = [];

    
/**
     * Create a new rule instance.
     *
     * @param  string  $type
     * @return void
     */
    
public function __construct($type)
    {
        
$this->type $type;
    }

    
/**
     * Determine if the validation rule passes.
     *
     * @param  string  $attribute
     * @param  mixed  $value
     * @return bool
     */
    
public function passes($attribute$value)
    {
        if (
$value instanceof $this->type) {
            return 
$this->isDesirable($value);
        }

        if (
is_null($value) || ! enum_exists($this->type) || ! method_exists($this->type'tryFrom')) {
            return 
false;
        }

        try {
            
$value $this->type::tryFrom($value);

            return ! 
is_null($value) && $this->isDesirable($value);
        } catch (
TypeError) {
            return 
false;
        }
    }

    
/**
     * Specify the cases that should be considered valid.
     *
     * @param  \UnitEnum[]|\UnitEnum  $values
     * @return $this
     */
    
public function only($values)
    {
        
$this->only Arr::wrap($values);

        return 
$this;
    }

    
/**
     * Specify the cases that should be considered invalid.
     *
     * @param  \UnitEnum[]|\UnitEnum  $values
     * @return $this
     */
    
public function except($values)
    {
        
$this->except Arr::wrap($values);

        return 
$this;
    }

    
/**
     * Determine if the given case is a valid case based on the only / except values.
     *
     * @param  mixed  $value
     * @return bool
     */
    
protected function isDesirable($value)
    {
        return match (
true) {
            ! empty(
$this->only) => in_array(needle$valuehaystack$this->onlystricttrue),
            ! empty(
$this->except) => ! in_array(needle$valuehaystack$this->exceptstricttrue),
            default => 
true,
        };
    }

    
/**
     * Get the validation error message.
     *
     * @return array
     */
    
public function message()
    {
        
$message $this->validator->getTranslator()->get('validation.enum');

        return 
$message === 'validation.enum'
            
? ['The selected :attribute is invalid.']
            : 
$message;
    }

    
/**
     * Set the current validator.
     *
     * @param  \Illuminate\Validation\Validator  $validator
     * @return $this
     */
    
public function setValidator($validator)
    {
        
$this->validator $validator;

        return 
$this;
    }
}

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