!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/laravel/octane/src/Swoole/Handlers/   drwxr-xr-x
Free 28.73 GB of 117.98 GB (24.35%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Laravel\Octane\Swoole\Handlers;

use 
Laravel\Octane\ApplicationFactory;
use 
Laravel\Octane\Stream;
use 
Laravel\Octane\Swoole\SwooleClient;
use 
Laravel\Octane\Swoole\SwooleExtension;
use 
Laravel\Octane\Swoole\WorkerState;
use 
Laravel\Octane\Worker;
use 
Swoole\Http\Server;
use 
Throwable;

class 
OnWorkerStart
{
    public function 
__construct(
        protected 
SwooleExtension $extension,
        protected 
$basePath,
        protected array 
$serverState,
        protected 
WorkerState $workerState,
        protected 
bool $shouldSetProcessName true
    
) {
    }

    
/**
     * Handle the "workerstart" Swoole event.
     *
     * @param  \Swoole\Http\Server  $server
     * @return void
     */
    
public function __invoke($serverint $workerId)
    {
        
$this->clearOpcodeCache();

        
$this->workerState->server $server;
        
$this->workerState->workerId $workerId;
        
$this->workerState->workerPid posix_getpid();
        
$this->workerState->worker $this->bootWorker($server);

        
$this->dispatchServerTickTaskEverySecond($server);
        
$this->streamRequestsToConsole($server);

        if (
$this->shouldSetProcessName) {
            
$isTaskWorker $workerId >= $server->setting['worker_num'];

            
$this->extension->setProcessName(
                
$this->serverState['appName'],
                
$isTaskWorker 'task worker process' 'worker process',
            );
        }
    }

    
/**
     * Boot the Octane worker and application.
     *
     * @param  \Swoole\Http\Server  $server
     * @return \Laravel\Octane\Worker|null
     */
    
protected function bootWorker($server)
    {
        try {
            return 
tap(new Worker(
                new 
ApplicationFactory($this->basePath),
                
$this->workerState->client = new SwooleClient
            
))->boot([
                
'octane.cacheTable' => $this->workerState->cacheTable,
                
Server::class => $server,
                
WorkerState::class => $this->workerState,
            ]);
        } catch (
Throwable $e) {
            
Stream::shutdown($e);

            
$server->shutdown();
        }
    }

    
/**
     * Start the Octane server tick to dispatch the tick task every second.
     *
     * @param  \Swoole\Http\Server  $server
     * @return void
     */
    
protected function dispatchServerTickTaskEverySecond($server)
    {
        
// ...
    
}

    
/**
     * Register the request handled listener that will output request information per request.
     *
     * @param  \Swoole\Http\Server  $server
     * @return void
     */
    
protected function streamRequestsToConsole($server)
    {
        
$this->workerState->worker->onRequestHandled(function ($request$response$sandbox) {
            if (! 
$sandbox->environment('local''testing')) {
                return;
            }

            
Stream::request(
                
$request->getMethod(),
                
$request->fullUrl(),
                
$response->getStatusCode(),
                (
microtime(true) - $this->workerState->lastRequestTime) * 1000,
            );
        });
    }

    
/**
     * Clear the APCu and Opcache caches.
     *
     * @return void
     */
    
protected function clearOpcodeCache()
    {
        foreach ([
'apcu_clear_cache''opcache_reset'] as $function) {
            if (
function_exists($function)) {
                
$function();
            }
        }
    }
}

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