!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:     Base64ContentEncoder.php (3.63 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 Base 64 Transfer Encoding in Swift Mailer.
 *
 * @author Chris Corbyn
 */
class Swift_Mime_ContentEncoder_Base64ContentEncoder extends Swift_Encoder_Base64Encoder implements Swift_Mime_ContentEncoder
{
    
/**
     * Encode stream $in to stream $out.
     *
     * @param int $firstLineOffset
     */
    
public function encodeByteStream(Swift_OutputByteStream $osSwift_InputByteStream $is$firstLineOffset 0$maxLineLength 0)
    {
        if (
>= $maxLineLength || 76 $maxLineLength) {
            
$maxLineLength 76;
        }

        
$remainder 0;
        
$base64ReadBufferRemainderBytes null;

        
// To reduce memory usage, the output buffer is streamed to the input buffer like so:
        //   Output Stream => base64encode => wrap line length => Input Stream
        // HOWEVER it's important to note that base64_encode() should only be passed whole triplets of data (except for the final chunk of data)
        // otherwise it will assume the input data has *ended* and it will incorrectly pad/terminate the base64 data mid-stream.
        // We use $base64ReadBufferRemainderBytes to carry over 1-2 "remainder" bytes from the each chunk from OutputStream and pre-pend those onto the
        // chunk of bytes read in the next iteration.
        // When the OutputStream is empty, we must flush any remainder bytes.
        
while (true) {
            
$readBytes $os->read(8192);
            
$atEOF = (false === $readBytes);

            if (
$atEOF) {
                
$streamTheseBytes $base64ReadBufferRemainderBytes;
            } else {
                
$streamTheseBytes $base64ReadBufferRemainderBytes.$readBytes;
            }
            
$base64ReadBufferRemainderBytes null;
            
$bytesLength \strlen($streamTheseBytes);

            if (
=== $bytesLength) { // no data left to encode
                
break;
            }

            
// if we're not on the last block of the ouput stream, make sure $streamTheseBytes ends with a complete triplet of data
            // and carry over remainder 1-2 bytes to the next loop iteration
            
if (!$atEOF) {
                
$excessBytes $bytesLength 3;
                if (
!== $excessBytes) {
                    
$base64ReadBufferRemainderBytes substr($streamTheseBytes, -$excessBytes);
                    
$streamTheseBytes substr($streamTheseBytes0$bytesLength $excessBytes);
                }
            }

            
$encoded base64_encode($streamTheseBytes);
            
$encodedTransformed '';
            
$thisMaxLineLength $maxLineLength $remainder $firstLineOffset;

            while (
$thisMaxLineLength \strlen($encoded)) {
                
$encodedTransformed .= substr($encoded0$thisMaxLineLength)."\r\n";
                
$firstLineOffset 0;
                
$encoded substr($encoded$thisMaxLineLength);
                
$thisMaxLineLength $maxLineLength;
                
$remainder 0;
            }

            if (
$remainingLength \strlen($encoded)) {
                
$remainder += $remainingLength;
                
$encodedTransformed .= $encoded;
                
$encoded null;
            }

            
$is->write($encodedTransformed);

            if (
$atEOF) {
                break;
            }
        }
    }

    
/**
     * Get the name of this encoding scheme.
     * Returns the string 'base64'.
     *
     * @return string
     */
    
public function getName()
    {
        return 
'base64';
    }
}

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