⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.101
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
Server Software:
Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.25
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
id
/
taxi.dev-unit.com
/
app
/
Jobs
/
View File Name :
NotifyViaSocket.php
<?php namespace App\Jobs; use ElephantIO\Client; use Illuminate\Bus\Queueable; use Illuminate\Support\Facades\Log; use Illuminate\Queue\SerializesModels; use Illuminate\Queue\InteractsWithQueue; use ElephantIO\Engine\SocketIO\Version2X; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; class NotifyViaSocket //implements ShouldQueue { // use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; protected $event_name; protected $message; /** * Create a new job instance. * * @return void */ public function __construct($event_name, $message) { $this->event_name = $event_name; $this->message = $message; } /** * Execute the job. * * @return void */ public function handle() { return; try { $path2 = base_path('/vendor/autoload.php'); include("$path2"); $socket_port=env('SOCKET_PORT'); $socket_https=env('SOCKET_HTTPS'); if ($socket_https == "yes") { $socket_url='http://localhost:'.$socket_port; $client = new Client(new Version2X($socket_url, ['context' => ['ssl' => ['verify_peer_name' =>false, 'verify_peer' => false]]])); } else { $socket_url='http://localhost:'."$socket_port"; $client = new Client(new Version2X($socket_url)); } Log::info("message-transfered"); $client->initialize(); $client->of('/php/user'); $client->emit($this->event_name, $this->message); $client->close(); } catch (\Expection $e) { Log::error($e); } } }