!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/ipcam-cctv/control/   drwxr-xr-x
Free 13.03 GB of 57.97 GB (22.48%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     spawn-vlc.php (3.48 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
require_once(dirname(__FILE__).'/config.php');
require_once(
dirname(__FILE__).'/../include/camera.php');
$database->keep_connected 0;

$database->prepared_query('select `id` from `devices` where `name`=?', array('s'), array($argv[1]));
if (isset(
$database->result[0])) { $config = new config($database$database->result[0]['id']); } else { $config = new config($database); }

$device = new camera($database$config->config_datafalse$argv[1]);
if (!
$device->device_data) {
    echo 
"No Device Data! [".$argv[1]."]\n";
    exit();
}

$try 0;

$device->log_add('Device started.'0);

while (!
file_exists($config->config_data['pid_directory'].'/'.$device->device_data['name'].'.norespawn')) {

    if (
$try 0) {
        if ((
time()-$timestamp) < $config->config_data['retry_time_limit']) {
            if (
$try $config->config_data['retry_count']) {
                
$device->log_add('Device reload limit hit. Sleeping for '.$config->config_data['sleep_time'].' seconds (time='.(time()-$timestamp).', try='.$try.')'2);
                
$try 0;
                
file_put_contents($config->config_data['pid_directory'].'/'.$device->device_data['name'].'.sleep'$config->config_data['sleep_time']);
                
file_put_contents($config->config_data['pid_directory'].'/'.$device->device_data['name'].'.sleeppid'getmypid());
                
sleep($config->config_data['sleep_time']);
                
unlink($config->config_data['pid_directory'].'/'.$device->device_data['name'].'.sleeppid');
                
unlink($config->config_data['pid_directory'].'/'.$device->device_data['name'].'.sleep');
            } else {
                
$device->log_add('Device reloaded after '.(time()-$timestamp).' seconds. (try='.$try.')'1);
            }
        } else {
            
$device->log_add('Device reloaded after '.(time()-$timestamp).' seconds.'0);
            
$try 0;
        }
    }
    
$try++;
    
$timestamp time();

    if (
$config->config_data['transcode_enable'] == 1) {
        
exec($config->config_data['vlc_exec'].' '.$device->full_url().' vlc://quit --sout \'#transcode{vcodec='.$config->config_data['transcode_video_codec'].',vb='.$config->config_data['transcode_bitrate'].',fps='.$config->config_data['transcode_fps'].',scale='.$config->config_data['transcode_scale'].',acodec='.$config->config_data['transcode_audio_codec'].'}:std{access=file,mux='.$config->config_data['recording_file_mux'].',dst="'.$config->config_data['recording_directory'].'/'.$device->device_data['name'].'.'.date('ymdHis').$config->config_data['recording_file_extension'].'"}\' 2>&1 | tee '.$config->config_data['log_directory'].'/'.$device->device_data['name'].'.'.date('ymdHis').'.log & jobs -p > '.$config->config_data['pid_directory'].'/'.$device->device_data['name'].'.pid');
    } else {
        
exec($config->config_data['vlc_exec'].' '.$device->full_url().' vlc://quit --sout \'#std{access=file,mux='.$config->config_data['recording_file_mux'].',dst="'.$config->config_data['recording_directory'].'/'.$device->device_data['name'].'.'.date('ymdHis').$config->config_data['recording_file_extension'].'"}\' 2>&1 | tee '.$config->config_data['log_directory'].'/'.$device->device_data['name'].'.'.date('ymdHis').'.log & jobs -p > '.$config->config_data['pid_directory'].'/'.$device->device_data['name'].'.pid');
    }

    
unlink($config->config_data['pid_directory'].'/'.$device->device_data['name'].'.pid');
}

$device->log_add('Device stopped.'0);

unlink($config->config_data['pid_directory'].'/'.$device->device_data['name'].'.norespawn');
?>

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