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


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

namespace Egulias\EmailValidator;

use 
Egulias\EmailValidator\Exception\ExpectingATEXT;
use 
Egulias\EmailValidator\Exception\NoLocalPart;
use 
Egulias\EmailValidator\Parser\DomainPart;
use 
Egulias\EmailValidator\Parser\LocalPart;
use 
Egulias\EmailValidator\Warning\EmailTooLong;

/**
 * EmailParser
 *
 * @author Eduardo Gulias Davis <me@egulias.com>
 */
class EmailParser
{
    const 
EMAIL_MAX_LENGTH 254;

    
/**
     * @var array
     */
    
protected $warnings = [];

    
/**
     * @var string
     */
    
protected $domainPart '';

    
/**
     * @var string
     */
    
protected $localPart '';
    
/**
     * @var EmailLexer
     */
    
protected $lexer;

    
/**
     * @var LocalPart
     */
    
protected $localPartParser;

    
/**
     * @var DomainPart
     */
    
protected $domainPartParser;

    public function 
__construct(EmailLexer $lexer)
    {
        
$this->lexer $lexer;
        
$this->localPartParser = new LocalPart($this->lexer);
        
$this->domainPartParser = new DomainPart($this->lexer);
    }

    
/**
     * @param string $str
     * @return array
     */
    
public function parse($str)
    {
        
$this->lexer->setInput($str);

        if (!
$this->hasAtToken()) {
            throw new 
NoLocalPart();
        }


        
$this->localPartParser->parse($str);
        
$this->domainPartParser->parse($str);

        
$this->setParts($str);

        if (
$this->lexer->hasInvalidTokens()) {
            throw new 
ExpectingATEXT();
        }

        return array(
'local' => $this->localPart'domain' => $this->domainPart);
    }

    
/**
     * @return Warning\Warning[]
     */
    
public function getWarnings()
    {
        
$localPartWarnings $this->localPartParser->getWarnings();
        
$domainPartWarnings $this->domainPartParser->getWarnings();
        
$this->warnings array_merge($localPartWarnings$domainPartWarnings);

        
$this->addLongEmailWarning($this->localPart$this->domainPart);

        return 
$this->warnings;
    }

    
/**
     * @return string
     */
    
public function getParsedDomainPart()
    {
        return 
$this->domainPart;
    }

    
/**
     * @param string $email
     */
    
protected function setParts($email)
    {
        
$parts explode('@'$email);
        
$this->domainPart $this->domainPartParser->getDomainPart();
        
$this->localPart $parts[0];
    }

    
/**
     * @return bool
     */
    
protected function hasAtToken()
    {
        
$this->lexer->moveNext();
        
$this->lexer->moveNext();
        if (
$this->lexer->token['type'] === EmailLexer::S_AT) {
            return 
false;
        }

        return 
true;
    }

    
/**
     * @param string $localPart
     * @param string $parsedDomainPart
     */
    
protected function addLongEmailWarning($localPart$parsedDomainPart)
    {
        if (
strlen($localPart '@' $parsedDomainPart) > self::EMAIL_MAX_LENGTH) {
            
$this->warnings[EmailTooLong::CODE] = new EmailTooLong();
        }
    }
}

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