!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/main_file/app/Traits/   drwxrwxr-x
Free 13.19 GB of 57.97 GB (22.76%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     ZoomMeetingTrait.php (4.74 KB)      -rw-rw-r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
namespace App\Traits;

use 
GuzzleHttp\Client;
use 
App\Models\Utility;
use 
Log;

/**
 * trait ZoomMeetingTrait
 */
trait ZoomMeetingTrait
{
    public 
$client;
    public 
$jwt;
    public 
$headers;
    public 
$meeting_url="https://api.zoom.us/v2/";
    public function 
__construct()
    {
        
$this->client = new Client();
    }


    private function 
retrieveZoomUrl()
    {
        return 
$this->meeting_url;
    }

    public function 
toZoomTimeFormat(string $dateTime)
    {
        try {
            
$date = new \DateTime($dateTime);

            return 
$date->format('Y-m-d\TH:i:s');
        } catch (
\Exception $e) {
            
Log::error('ZoomJWT->toZoomTimeFormat : '.$e->getMessage());

            return 
'';
        }
    }

    public function 
createmitting($data)
    {
        
$path 'users/me/meetings';
        
$url $this->retrieveZoomUrl();

        
$body = [
            
'headers' => $this->getHeader(),
            
'body'    => json_encode([
                
'title'      => $data['title'],
                
'type'       => self::MEETING_TYPE_SCHEDULE,
                
'start_time' => $this->toZoomTimeFormat($data['start_time']),
                
'duration'   => $data['duration'],
                
'password' => $data['password'],
                
'agenda'     => (! empty($data['agenda'])) ? $data['agenda'] : null,
                
'timezone'     => 'Asia/Kolkata',
                
'settings'   => [
                    
'host_video'        => ($data['host_video'] == "1") ? true false,
                    
'participant_video' => ($data['participant_video'] == "1") ? true false,
                    
'waiting_room'      => true,
                ],
            ]),
        ];

        
$response =  $this->client->post($url.$path$body);

        return [
            
'success' => $response->getStatusCode() === 201,
            
'data'    => json_decode($response->getBody(), true),
        ];

    }

    public function 
meetingUpdate($id$data)
    {
        
$path 'meetings/'.$id;
        
$url $this->retrieveZoomUrl();

        
$body = [
            
'headers' => $this->getHeader(),
            
'body'    => json_encode([
                
'title'      => $data['title'],
                
'type'       => self::MEETING_TYPE_SCHEDULE,
                
'start_time' => $this->toZoomTimeFormat($data['start_time']),
                
'duration'   => $data['duration'],
                
'agenda'     => (! empty($data['agenda'])) ? $data['agenda'] : null,
                
'timezone'     => config('app.timezone'),
                
'settings'   => [
                    
'host_video'        => ($data['host_video'] == "1") ? true false,
                    
'participant_video' => ($data['participant_video'] == "1") ? true false,
                    
'waiting_room'      => true,
                ],
            ]),
        ];


        
$response =  $this->client->patch($url.$path$body);

        return [
            
'success' => $response->getStatusCode() === 204,
            
'data'    => json_decode($response->getBody(), true),
        ];
    }

    public function 
get($id)
    {
        
$path 'meetings/'.$id;
        
$url $this->retrieveZoomUrl();

        
$body = [
            
'headers' => $this->getHeader(),
            
'body'    => json_encode([]),
        ];

            
$response =  $this->client->get($url.$path$body);
            return [
                
'success' => $response->getStatusCode() === 204,
                
'data'    => json_decode($response->getBody(), true),
            ];


    }

    
/**
     * @param string $id
     *
     * @return bool[]
     */
    
public function delete($id)
    {
        
$path 'meetings/'.$id;
        
$url $this->retrieveZoomUrl();
        
$body = [
            
'headers' => $this->headers,
            
'body'    => json_encode([]),
        ];

        
$response =  $this->client->delete($url.$path$body);

        return [
            
'success' => $response->getStatusCode() === 204,
        ];
    }

    public function 
getHeader()
    {
        return [
            
'Authorization' => 'Bearer '.$this->getToken(),
            
'Content-Type'  => 'application/json',
            
'Accept'        => 'application/json',
        ];
    }
    public function 
getToken(){

        
$settings  Utility::settings(\Auth::user()->id);

        if((isset(
$settings['zoom_apikey']) && !empty($settings['zoom_apikey'])) && (isset($settings['zoom_apisecret']) && !empty($settings['zoom_apisecret']))){
            
$key $settings['zoom_apikey'];
            
$secret $settings['zoom_apisecret'];
            
$payload = [
                
'iss' => $key,
                
'exp' => strtotime('+1 minute'),
            ];


            return 
\Firebase\JWT\JWT::encode($payload$secret'HS256');
        }else{
            return 
false;
        }

    }


}

 
?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

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