!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/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/   drwxr-xr-x
Free 13.1 GB of 57.97 GB (22.6%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

/*
 * This file is part of SwiftMailer.
 * (c) 2004-2009 Chris Corbyn
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

/**
 * Handles Quoted Printable (QP) Transfer Encoding in Swift Mailer using the PHP core function.
 *
 * @author Lars Strojny
 */
class Swift_Mime_ContentEncoder_NativeQpContentEncoder implements Swift_Mime_ContentEncoder
{
    
/**
     * @var string|null
     */
    
private $charset;

    
/**
     * @param string|null $charset
     */
    
public function __construct($charset null)
    {
        
$this->charset $charset ?: 'utf-8';
    }

    
/**
     * Notify this observer that the entity's charset has changed.
     *
     * @param string $charset
     */
    
public function charsetChanged($charset)
    {
        
$this->charset $charset;
    }

    
/**
     * Encode $in to $out.
     *
     * @param Swift_OutputByteStream $os              to read from
     * @param Swift_InputByteStream  $is              to write to
     * @param int                    $firstLineOffset
     * @param int                    $maxLineLength   0 indicates the default length for this encoding
     *
     * @throws RuntimeException
     */
    
public function encodeByteStream(Swift_OutputByteStream $osSwift_InputByteStream $is$firstLineOffset 0$maxLineLength 0)
    {
        if (
'utf-8' !== $this->charset) {
            throw new 
RuntimeException(sprintf('Charset "%s" not supported. NativeQpContentEncoder only supports "utf-8"'$this->charset));
        }

        
$string '';

        while (
false !== $bytes $os->read(8192)) {
            
$string .= $bytes;
        }

        
$is->write($this->encodeString($string));
    }

    
/**
     * Get the MIME name of this content encoding scheme.
     *
     * @return string
     */
    
public function getName()
    {
        return 
'quoted-printable';
    }

    
/**
     * Encode a given string to produce an encoded string.
     *
     * @param string $string
     * @param int    $firstLineOffset if first line needs to be shorter
     * @param int    $maxLineLength   0 indicates the default length for this encoding
     *
     * @throws RuntimeException
     *
     * @return string
     */
    
public function encodeString($string$firstLineOffset 0$maxLineLength 0)
    {
        if (
'utf-8' !== $this->charset) {
            throw new 
RuntimeException(sprintf('Charset "%s" not supported. NativeQpContentEncoder only supports "utf-8"'$this->charset));
        }

        return 
$this->standardize(quoted_printable_encode($string));
    }

    
/**
     * Make sure CRLF is correct and HT/SPACE are in valid places.
     *
     * @param string $string
     *
     * @return string
     */
    
protected function standardize($string)
    {
        
// transform CR or LF to CRLF
        
$string preg_replace('~=0D(?!=0A)|(?<!=0D)=0A~''=0D=0A'$string);
        
// transform =0D=0A to CRLF
        
$string str_replace(["\t=0D=0A"' =0D=0A''=0D=0A'], ["=09\r\n""=20\r\n""\r\n"], $string);

        switch (
\ord(substr($string, -1))) {
            case 
0x09:
                
$string substr_replace($string'=09', -1);
                break;
            case 
0x20:
                
$string substr_replace($string'=20', -1);
                break;
        }

        return 
$string;
    }
}

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