Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php require __DIR__ . "\x2f\166\x65\x6e\x64\x6f\162\x2f\x61\165\x74\x6f\x6c\157\x61\x6..
Decoded Output download
<?php
require __DIR__ . "/vendor/autoload.php"; use Ratchet\Client\Connector; use React\EventLoop\Factory as EventLoopFactory; goto esoBK; YNrUi: $wsUrl = str_replace("http", "ws", "{$host}/ari/events?app=astTECS&api_key={$username}:{$password}"); goto P27BH; DKELv: function updateWSInfo($channelID, $websocketURL, $hangupURL) { require "dbconnect.php"; $sql = "UPDATE `callLogger` SET `websocket_url`='{$websocketURL}', `hangup_url`='{$hangupURL}' WHERE `call_uid`='{$channelID}'"; echo "*****{$sql}"; error_log($sql); if ($connDB->query($sql) === TRUE) { echo "Record updated successfully"; } else { echo "Error updating record: " . $conn->error; } } goto lzu34; esoBK: $loop = EventLoopFactory::create(); goto K_ddW; rWDXz: function updateDB($channelId, $uniqueId, $state) { require "/var/www/html/voicebotConnector/eventListener/dbconnect.php"; if ($connDB === null) { die("Database connection failed in function."); } $currentDateTime = date("Y-m-d H:i:s"); $sql = "INSERT INTO `channelStateLogger`(`insert_date_time`, `channel_id`, `call_uid`, `channel_state`) VALUES ('{$currentDateTime}','{$channelId}', '{$uniqueId}', '{$state}')"; echo "{$sql}\xa"; if ($connDB->query($sql) === TRUE) { } else { } } goto q3pM8; lzu34: function getHangupCause($code) { $causeCodes = array(1 => "Unallocated", 2 => "NoRoute", 3 => "NoRoute", 6 => "Unacceptable", 7 => "Delivered", 16 => "Normal", 17 => "Busy", 18 => "NoResponse", 19 => "NoAnswer", 21 => "Rejected", 22 => "Changed", 26 => "Cleared", 27 => "OutOfOrder", 28 => "InvalidNumber", 29 => "Rejected", 30 => "Status", 31 => "Normal", 34 => "NoCircuit", 38 => "NetworkError", 41 => "TemporaryError", 42 => "Congestion", 43 => "Discarded", 44 => "Unavailable", 47 => "Unavailable", 49 => "QoSUnavailable", 50 => "NotSubscribed", 57 => "Unauthorized", 58 => "NotAvailable", 63 => "Unavailable", 65 => "NotImplemented", 66 => "NotImplemented", 69 => "NotImplemented", 81 => "InvalidReference", 88 => "Incompatible", 95 => "InvalidMessage", 96 => "MissingInfo", 97 => "NotImplemented", 98 => "InvalidState", 99 => "InvalidInfo", 100 => "InvalidContents", 101 => "InvalidState", 102 => "TimerExpired", 111 => "ProtocolError", 127 => "Interworking"); return $causeCodes[$code] ?? "Unknown"; } goto qQGaT; QBS7k: $loop->run(); goto D3J0q; D3J0q: function processEvent($eventType, $channelID, $channelState, $callerName, $channelExten, $channelContext, $callStatus) { echo "Event Type: " . $eventType . "
"; echo "Channel ID: " . $channelID . "
"; echo "Channel State: " . $channelState . "\xa"; echo "Caller Name: " . $callerName . "
"; echo "Channel Extension: " . $channelExten . "
"; echo "Channel Context: " . $channelContext . "
"; echo "Call Status: " . $callStatus . "\xa"; if (strcmp($channelContext, "from-internal") == 0) { echo "Outbound call\xa"; if (strcmp($eventType, "ChannelStateChange") == 0) { updateDB($channelID, $channelID, $channelState); if (strcmp($channelState, "Up") == 0) { echo "/usr/bin/php /var/www/html/voicebotConnector/eventListener/bridgeCall.php {$channelID}"; exec("/usr/bin/php /var/www/html/voicebotConnector/eventListener/bridgeCall.php {$channelID}"); } } else { if (strcmp($eventType, "ChannelDestroyed") == 0) { updateDB($channelID, $channelID, $channelState); $causeReason = getHangupCause($callStatus); exec("/usr/bin/php /var/www/html/voicebotConnector/eventListener/hangupCallLog.php {$channelID} {$causeReason}"); echo "/usr/bin/php /var/www/html/voicebotConnector/eventListener/hangupCallLog.php {$channelID} {$causeReason}"; echo "Hangup call - {$channelID}
"; } } } else { if (strcmp($channelContext, "from-pstn") == 0) { echo "Inbound call\xa"; if (strcmp($eventType, "StasisStart") == 0) { $wsLink = getWsLink($channelID, $callerName, $channelExten); $websocketURL = $wsLink["websocketURL"]; $hangupURL = $wsLink["hangupURL"]; exec("/usr/bin/php /var/www/html/voicebotConnector/eventListener/bridgeCallIncoming.php {$channelID} {$websocketURL} {$channelExten} {$callerName} {$websocketURL} {$hangupURL}"); echo "/usr/bin/php /var/www/html/voicebotConnector/eventListener/bridgeCallIncoming.php {$channelID} {$websocketURL} {$channelExten} {$callerName} {$websocketURL} {$hangupURL}"; } else { if (strcmp($eventType, "StasisEnd") == 0) { exec("/usr/bin/php /var/www/html/voicebotConnector/eventListener/hangupCallLog.php {$channelID} Hangup"); echo "/usr/bin/php /var/www/html/voicebotConnector/eventListener/hangupCallLog.php {$channelID} Hangup"; } } } } echo "**************************************************
"; } goto rWDXz; P27BH: $connector($wsUrl)->then(function ($conn) use($loop) { echo "Connected to ARI WebSocket.\xa"; $conn->on("message", function ($msg) { $event = json_decode($msg, true); if (isset($event["type"])) { processEvent($event["type"], $event["channel"]["id"], $event["channel"]["state"], $event["channel"]["caller"]["name"], $event["channel"]["dialplan"]["exten"], $event["channel"]["dialplan"]["context"], $event["cause"]); } else { echo "Received non-event message." . PHP_EOL; } }); $conn->on("close", function () use($loop) { echo "Connection to ARI WebSocket closed.\xa"; $loop->stop(); }); }, function ($e) use($loop) { echo "Could not connect to ARI WebSocket: {$e->getMessage()}
"; $loop->stop(); }); goto QBS7k; gLw1z: $host = "http://127.0.0.1:8088"; goto daQ17; K_ddW: $connector = new Connector($loop); goto gLw1z; q3pM8: function getWsLink($channelID, $callerName, $channelExten) { require "../cred.php"; $returnData = array(); $websocketURL = ''; $hangupURL = ''; $data = array("incomingDID" => "{$callerName}", "callerID" => "{$channelExten}", "channelID" => "{$channelID}"); $jsonData = json_encode($data); $ch = curl_init($dataUrl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Content-Length: " . strlen($jsonData))); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonData); $response = curl_exec($ch); if (curl_errno($ch)) { echo "Error:" . curl_error($ch); } else { $responseData = json_decode($response, true); print_r($responseData); if (isset($responseData["websocketURL"]) && isset($responseData["hangupURL"])) { $websocketURL = $responseData["websocketURL"]; $hangupURL = $responseData["hangupURL"]; writeToLog("Web socket - {$websocketURL}, hangup url - {$hangupURL}"); } else { echo "Unexpected response format.
"; writeToLog("Unexpected format"); } } curl_close($ch); return array("websocketURL" => $websocketURL, "hangupURL" => $hangupURL); } goto DKELv; daQ17: $username = "asttecs"; goto onbvT; onbvT: $password = "ARI_astTECS"; goto YNrUi; qQGaT: function writeToLog($message) { $currentDate = date("Y-m-d H:i:s"); $myfile = fopen("eventListen.txt", "a") or die("Unable to open file!"); $txt = "[{$currentDate}] - {$message}
"; fwrite($myfile, $txt); fclose($myfile); }
?>
Did this file decode correctly?
Original Code
<?php
require __DIR__ . "\x2f\166\x65\x6e\x64\x6f\162\x2f\x61\165\x74\x6f\x6c\157\x61\x64\x2e\x70\x68\160"; use Ratchet\Client\Connector; use React\EventLoop\Factory as EventLoopFactory; goto esoBK; YNrUi: $wsUrl = str_replace("\150\x74\x74\x70", "\167\x73", "{$host}\57\x61\x72\x69\x2f\145\x76\x65\156\164\163\77\x61\160\160\75\x61\163\x74\x54\x45\103\123\x26\141\x70\x69\137\153\145\x79\75{$username}\x3a{$password}"); goto P27BH; DKELv: function updateWSInfo($channelID, $websocketURL, $hangupURL) { require "\144\x62\x63\157\x6e\x6e\x65\143\164\56\160\150\x70"; $sql = "\x55\x50\104\101\x54\x45\40\140\x63\141\x6c\154\114\x6f\x67\147\145\x72\x60\x20\123\105\124\x20\x60\x77\x65\142\163\157\143\x6b\145\x74\x5f\x75\x72\x6c\x60\x3d\47{$websocketURL}\47\54\40\140\150\x61\156\147\165\160\137\x75\x72\x6c\140\75\x27{$hangupURL}\47\x20\x57\x48\x45\122\105\40\x60\x63\x61\154\154\x5f\x75\x69\144\140\75\x27{$channelID}\x27"; echo "\x2a\52\52\x2a\x2a{$sql}"; error_log($sql); if ($connDB->query($sql) === TRUE) { echo "\122\145\143\x6f\162\x64\x20\165\160\144\x61\x74\145\144\40\163\x75\143\143\x65\x73\163\x66\165\x6c\154\171"; } else { echo "\x45\162\162\157\162\x20\x75\x70\x64\141\x74\x69\156\x67\40\162\145\143\157\162\x64\x3a\40" . $conn->error; } } goto lzu34; esoBK: $loop = EventLoopFactory::create(); goto K_ddW; rWDXz: function updateDB($channelId, $uniqueId, $state) { require "\57\166\x61\x72\57\167\167\167\57\x68\x74\155\154\57\166\157\151\143\x65\x62\157\164\103\157\x6e\156\145\x63\x74\x6f\162\x2f\x65\x76\145\156\x74\x4c\151\163\164\145\x6e\145\162\57\x64\x62\x63\x6f\156\x6e\145\x63\164\x2e\160\150\x70"; if ($connDB === null) { die("\104\x61\x74\x61\142\x61\x73\145\x20\x63\157\156\156\x65\x63\164\x69\x6f\156\40\146\x61\151\x6c\x65\144\40\151\156\40\146\165\156\x63\x74\x69\x6f\x6e\x2e"); } $currentDateTime = date("\131\55\155\55\144\x20\110\72\151\x3a\163"); $sql = "\x49\x4e\123\x45\x52\x54\x20\111\x4e\124\x4f\40\x60\x63\x68\141\156\x6e\145\x6c\x53\164\x61\164\x65\x4c\157\x67\147\x65\x72\x60\x28\x60\151\x6e\x73\145\x72\x74\137\144\x61\164\x65\x5f\164\151\x6d\x65\x60\54\x20\x60\x63\x68\x61\x6e\x6e\145\x6c\137\151\x64\x60\54\40\140\143\141\154\154\x5f\x75\151\x64\x60\54\x20\x60\143\150\x61\156\x6e\x65\154\137\x73\164\x61\x74\145\140\51\40\126\x41\x4c\125\105\123\x20\50\x27{$currentDateTime}\47\54\x27{$channelId}\47\54\x20\x27{$uniqueId}\x27\x2c\x20\x27{$state}\x27\x29"; echo "{$sql}\xa"; if ($connDB->query($sql) === TRUE) { } else { } } goto q3pM8; lzu34: function getHangupCause($code) { $causeCodes = array(1 => "\125\x6e\x61\154\x6c\157\x63\x61\164\x65\x64", 2 => "\x4e\x6f\x52\157\x75\x74\x65", 3 => "\116\157\x52\157\165\164\x65", 6 => "\x55\156\x61\x63\143\x65\x70\164\141\142\x6c\145", 7 => "\x44\145\154\x69\166\x65\162\x65\144", 16 => "\116\157\x72\155\x61\154", 17 => "\102\165\163\171", 18 => "\116\x6f\122\x65\x73\160\x6f\156\163\x65", 19 => "\116\x6f\101\156\x73\167\x65\x72", 21 => "\122\145\152\x65\143\164\145\144", 22 => "\103\x68\x61\x6e\147\x65\144", 26 => "\103\154\145\141\x72\145\x64", 27 => "\x4f\165\164\117\146\117\x72\144\x65\x72", 28 => "\111\156\166\x61\x6c\151\x64\116\x75\x6d\x62\145\x72", 29 => "\x52\145\x6a\145\143\164\145\144", 30 => "\x53\164\141\x74\165\x73", 31 => "\116\157\x72\155\x61\154", 34 => "\x4e\157\x43\151\162\x63\x75\x69\x74", 38 => "\x4e\145\164\x77\157\162\153\x45\x72\162\x6f\162", 41 => "\x54\x65\x6d\160\157\162\x61\162\171\x45\162\162\157\x72", 42 => "\x43\x6f\156\x67\145\163\x74\151\x6f\x6e", 43 => "\104\151\x73\143\141\162\144\x65\144", 44 => "\125\x6e\141\x76\141\151\154\141\142\154\145", 47 => "\125\x6e\141\166\x61\x69\154\x61\142\x6c\x65", 49 => "\121\x6f\x53\x55\156\x61\166\141\151\x6c\x61\x62\x6c\145", 50 => "\116\x6f\164\123\x75\142\x73\143\x72\151\x62\145\x64", 57 => "\x55\x6e\141\165\x74\150\x6f\x72\151\172\x65\x64", 58 => "\x4e\157\164\x41\166\141\x69\154\x61\142\x6c\145", 63 => "\125\x6e\141\x76\x61\x69\x6c\141\142\154\x65", 65 => "\x4e\x6f\x74\111\155\160\x6c\145\x6d\x65\156\x74\145\x64", 66 => "\116\x6f\x74\111\x6d\x70\154\x65\x6d\145\156\x74\145\x64", 69 => "\x4e\x6f\164\111\x6d\x70\154\145\155\145\156\x74\x65\x64", 81 => "\x49\x6e\166\x61\154\151\x64\122\145\146\x65\x72\145\x6e\x63\x65", 88 => "\x49\156\x63\x6f\155\x70\141\x74\151\x62\154\x65", 95 => "\x49\x6e\166\141\x6c\x69\144\115\145\x73\163\x61\147\145", 96 => "\115\x69\163\163\x69\156\x67\111\x6e\146\157", 97 => "\116\x6f\x74\x49\x6d\x70\154\x65\155\x65\156\x74\145\144", 98 => "\x49\156\x76\141\x6c\x69\144\123\164\x61\164\145", 99 => "\111\156\166\x61\x6c\151\x64\x49\x6e\x66\157", 100 => "\111\x6e\166\141\x6c\x69\x64\x43\x6f\156\164\x65\156\x74\x73", 101 => "\x49\x6e\x76\x61\154\x69\144\123\164\141\164\145", 102 => "\x54\151\x6d\145\x72\x45\170\160\x69\162\145\x64", 111 => "\x50\162\x6f\x74\x6f\143\x6f\154\105\162\x72\x6f\x72", 127 => "\111\x6e\164\x65\162\x77\157\x72\153\x69\x6e\147"); return $causeCodes[$code] ?? "\125\156\153\x6e\157\167\x6e"; } goto qQGaT; QBS7k: $loop->run(); goto D3J0q; D3J0q: function processEvent($eventType, $channelID, $channelState, $callerName, $channelExten, $channelContext, $callStatus) { echo "\x45\166\145\x6e\164\x20\124\x79\x70\x65\x3a\x20" . $eventType . "\12"; echo "\103\x68\141\156\x6e\145\154\x20\111\x44\x3a\x20" . $channelID . "\12"; echo "\x43\x68\141\x6e\x6e\145\154\x20\x53\164\141\164\x65\72\x20" . $channelState . "\xa"; echo "\103\x61\x6c\154\145\162\x20\116\x61\x6d\145\x3a\x20" . $callerName . "\12"; echo "\103\150\x61\156\x6e\x65\154\40\105\x78\164\145\156\163\x69\x6f\x6e\x3a\40" . $channelExten . "\12"; echo "\x43\150\141\x6e\156\x65\154\x20\x43\157\x6e\164\145\170\x74\x3a\40" . $channelContext . "\12"; echo "\103\141\x6c\154\x20\123\x74\141\x74\165\163\x3a\x20" . $callStatus . "\xa"; if (strcmp($channelContext, "\x66\162\157\x6d\55\x69\156\164\x65\162\x6e\x61\154") == 0) { echo "\117\165\x74\142\157\165\156\x64\40\143\141\154\154\xa"; if (strcmp($eventType, "\x43\150\x61\x6e\156\145\154\123\164\x61\164\x65\x43\x68\x61\x6e\147\x65") == 0) { updateDB($channelID, $channelID, $channelState); if (strcmp($channelState, "\125\x70") == 0) { echo "\x2f\165\x73\x72\x2f\142\x69\156\57\x70\150\x70\40\57\x76\x61\x72\x2f\x77\x77\167\57\150\x74\x6d\x6c\x2f\x76\x6f\x69\x63\145\142\157\x74\x43\x6f\156\x6e\x65\143\164\157\162\57\145\166\x65\x6e\x74\114\x69\x73\164\145\156\145\162\x2f\x62\162\x69\144\x67\x65\x43\x61\x6c\x6c\56\x70\150\x70\x20{$channelID}"; exec("\x2f\x75\163\162\x2f\142\x69\x6e\57\160\x68\160\40\x2f\166\x61\162\57\x77\x77\167\57\x68\164\x6d\154\x2f\166\x6f\x69\143\145\142\157\164\103\x6f\x6e\x6e\145\143\164\x6f\x72\x2f\x65\x76\145\156\164\x4c\x69\x73\x74\x65\156\145\x72\x2f\x62\162\x69\144\x67\x65\103\x61\x6c\x6c\56\160\150\160\x20{$channelID}"); } } else { if (strcmp($eventType, "\103\x68\141\156\156\x65\x6c\104\x65\x73\x74\x72\x6f\x79\145\144") == 0) { updateDB($channelID, $channelID, $channelState); $causeReason = getHangupCause($callStatus); exec("\x2f\165\x73\162\x2f\142\x69\x6e\x2f\160\x68\x70\x20\57\x76\141\162\x2f\167\167\167\x2f\150\x74\155\154\57\166\157\x69\143\145\x62\x6f\164\x43\157\156\156\x65\143\x74\x6f\x72\57\145\166\x65\156\x74\x4c\151\x73\x74\145\156\145\162\57\150\x61\x6e\x67\x75\x70\x43\141\154\x6c\114\x6f\147\56\160\150\x70\40{$channelID}\40{$causeReason}"); echo "\x2f\165\163\162\57\x62\151\156\x2f\x70\x68\160\x20\x2f\166\141\x72\57\x77\167\x77\x2f\x68\x74\155\154\57\166\x6f\x69\143\x65\142\157\x74\x43\157\156\x6e\145\143\x74\157\162\57\145\166\x65\156\164\114\x69\163\x74\x65\156\145\162\57\x68\141\156\147\x75\x70\x43\x61\x6c\x6c\x4c\x6f\x67\56\x70\x68\x70\40{$channelID}\x20{$causeReason}"; echo "\110\x61\156\147\165\x70\40\x63\x61\154\x6c\x20\55\40{$channelID}\12"; } } } else { if (strcmp($channelContext, "\x66\162\x6f\x6d\x2d\160\163\x74\156") == 0) { echo "\111\156\142\157\x75\156\144\40\143\x61\x6c\154\xa"; if (strcmp($eventType, "\x53\x74\x61\163\x69\x73\x53\164\141\x72\164") == 0) { $wsLink = getWsLink($channelID, $callerName, $channelExten); $websocketURL = $wsLink["\x77\x65\x62\x73\x6f\x63\x6b\145\x74\x55\122\114"]; $hangupURL = $wsLink["\150\x61\156\x67\165\160\125\x52\114"]; exec("\x2f\x75\x73\x72\57\x62\151\x6e\x2f\160\x68\160\x20\x2f\x76\141\x72\57\x77\167\167\57\150\x74\x6d\x6c\x2f\166\157\151\143\145\142\x6f\x74\x43\157\156\x6e\145\143\164\x6f\162\57\145\166\x65\x6e\164\x4c\151\x73\x74\145\156\145\x72\x2f\x62\x72\x69\x64\147\x65\x43\141\x6c\154\x49\156\x63\x6f\x6d\x69\x6e\x67\x2e\x70\150\x70\x20{$channelID}\x20{$websocketURL}\40{$channelExten}\40{$callerName}\40{$websocketURL}\40{$hangupURL}"); echo "\x2f\165\x73\162\x2f\142\x69\156\57\x70\150\x70\x20\x2f\166\141\x72\x2f\x77\x77\x77\57\150\x74\x6d\154\x2f\166\157\151\x63\145\142\x6f\x74\x43\x6f\x6e\156\145\x63\164\157\x72\x2f\145\166\145\x6e\x74\x4c\x69\x73\164\x65\156\x65\x72\57\142\162\151\144\x67\145\103\141\154\x6c\111\156\143\157\x6d\x69\156\147\56\x70\x68\x70\40{$channelID}\40{$websocketURL}\40{$channelExten}\x20{$callerName}\40{$websocketURL}\40{$hangupURL}"; } else { if (strcmp($eventType, "\x53\164\141\x73\x69\x73\x45\x6e\144") == 0) { exec("\57\165\x73\162\x2f\x62\x69\156\x2f\x70\150\160\40\x2f\x76\141\162\x2f\167\167\167\57\150\164\x6d\x6c\x2f\x76\157\151\x63\145\142\157\164\103\157\156\156\x65\143\164\157\x72\x2f\x65\x76\145\x6e\164\114\x69\163\x74\x65\x6e\145\162\x2f\x68\x61\x6e\x67\x75\160\x43\141\x6c\154\x4c\157\147\56\160\x68\160\40{$channelID}\40\110\x61\156\x67\x75\160"); echo "\x2f\x75\163\162\57\142\151\x6e\57\x70\150\160\40\57\x76\141\162\x2f\167\x77\x77\x2f\x68\x74\155\154\57\166\x6f\x69\143\x65\x62\157\x74\x43\x6f\156\156\x65\143\x74\157\x72\57\145\x76\x65\x6e\x74\114\x69\x73\x74\x65\156\145\x72\x2f\x68\x61\156\147\165\160\103\141\154\x6c\x4c\157\x67\x2e\x70\150\x70\40{$channelID}\x20\110\141\x6e\x67\165\x70"; } } } } echo "\x2a\x2a\52\x2a\52\52\52\52\x2a\52\x2a\52\x2a\52\52\x2a\x2a\x2a\x2a\52\52\x2a\x2a\x2a\52\x2a\52\x2a\52\x2a\52\x2a\52\52\52\x2a\52\52\52\52\52\52\x2a\52\52\x2a\52\x2a\52\52\12"; } goto rWDXz; P27BH: $connector($wsUrl)->then(function ($conn) use($loop) { echo "\103\157\x6e\x6e\x65\143\164\x65\144\40\x74\157\40\101\x52\x49\x20\x57\145\x62\x53\x6f\143\153\x65\164\56\xa"; $conn->on("\x6d\x65\163\x73\x61\x67\145", function ($msg) { $event = json_decode($msg, true); if (isset($event["\164\x79\160\145"])) { processEvent($event["\x74\171\x70\x65"], $event["\x63\x68\x61\x6e\156\145\x6c"]["\151\144"], $event["\143\x68\x61\156\156\145\x6c"]["\x73\x74\141\164\x65"], $event["\x63\x68\x61\156\x6e\145\154"]["\x63\x61\154\154\145\x72"]["\x6e\141\155\145"], $event["\143\x68\141\x6e\156\145\x6c"]["\x64\x69\x61\x6c\x70\x6c\141\156"]["\145\170\164\x65\x6e"], $event["\x63\150\141\156\156\145\154"]["\144\x69\x61\x6c\160\154\x61\156"]["\x63\x6f\156\x74\145\170\164"], $event["\143\x61\x75\163\x65"]); } else { echo "\122\x65\x63\x65\151\x76\145\x64\40\156\157\156\55\145\x76\x65\x6e\x74\x20\155\145\163\x73\141\x67\145\56" . PHP_EOL; } }); $conn->on("\x63\x6c\157\x73\x65", function () use($loop) { echo "\103\157\x6e\x6e\145\143\164\151\x6f\x6e\x20\164\157\x20\101\x52\111\x20\127\x65\142\x53\x6f\143\153\x65\164\x20\x63\154\157\x73\x65\x64\56\xa"; $loop->stop(); }); }, function ($e) use($loop) { echo "\x43\157\165\154\x64\40\156\157\164\x20\143\157\x6e\156\145\143\x74\x20\164\x6f\40\101\122\111\x20\x57\x65\x62\x53\157\143\153\x65\x74\x3a\40{$e->getMessage()}\12"; $loop->stop(); }); goto QBS7k; gLw1z: $host = "\x68\164\x74\x70\x3a\x2f\x2f\x31\62\67\x2e\x30\x2e\x30\56\61\x3a\x38\x30\70\70"; goto daQ17; K_ddW: $connector = new Connector($loop); goto gLw1z; q3pM8: function getWsLink($channelID, $callerName, $channelExten) { require "\56\56\x2f\143\x72\145\x64\x2e\x70\150\x70"; $returnData = array(); $websocketURL = ''; $hangupURL = ''; $data = array("\151\156\x63\x6f\155\151\156\x67\x44\111\x44" => "{$callerName}", "\x63\x61\x6c\x6c\x65\162\x49\x44" => "{$channelExten}", "\143\150\141\156\156\145\154\x49\104" => "{$channelID}"); $jsonData = json_encode($data); $ch = curl_init($dataUrl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array("\103\157\x6e\164\145\156\x74\55\124\171\x70\x65\72\40\x61\160\160\154\151\x63\141\x74\151\x6f\x6e\57\x6a\163\157\x6e", "\x43\157\156\164\145\x6e\x74\x2d\x4c\x65\x6e\x67\x74\150\x3a\40" . strlen($jsonData))); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonData); $response = curl_exec($ch); if (curl_errno($ch)) { echo "\x45\162\162\157\x72\72" . curl_error($ch); } else { $responseData = json_decode($response, true); print_r($responseData); if (isset($responseData["\x77\x65\x62\163\x6f\x63\x6b\x65\164\x55\122\x4c"]) && isset($responseData["\x68\x61\x6e\147\x75\x70\125\122\x4c"])) { $websocketURL = $responseData["\x77\x65\142\163\x6f\143\x6b\x65\164\x55\x52\114"]; $hangupURL = $responseData["\150\141\x6e\147\165\x70\x55\x52\x4c"]; writeToLog("\127\x65\x62\x20\163\157\x63\153\145\164\40\55\40{$websocketURL}\54\40\150\x61\x6e\x67\x75\x70\40\x75\162\x6c\40\55\x20{$hangupURL}"); } else { echo "\125\156\145\170\160\145\143\x74\145\144\40\162\145\163\x70\x6f\x6e\163\145\40\x66\x6f\162\155\141\164\x2e\12"; writeToLog("\125\156\145\x78\160\x65\143\164\145\144\x20\146\x6f\x72\155\141\164"); } } curl_close($ch); return array("\x77\x65\142\x73\157\x63\153\x65\164\x55\x52\114" => $websocketURL, "\150\141\x6e\x67\x75\160\125\x52\x4c" => $hangupURL); } goto DKELv; daQ17: $username = "\x61\x73\164\x74\145\143\163"; goto onbvT; onbvT: $password = "\101\122\111\x5f\141\163\164\x54\105\x43\123"; goto YNrUi; qQGaT: function writeToLog($message) { $currentDate = date("\131\55\x6d\x2d\144\x20\x48\x3a\x69\72\x73"); $myfile = fopen("\145\x76\145\156\x74\x4c\x69\x73\x74\x65\x6e\56\x74\170\164", "\x61") or die("\125\x6e\141\142\154\x65\40\x74\x6f\40\x6f\x70\145\x6e\40\x66\x69\154\145\41"); $txt = "\x5b{$currentDate}\135\40\x2d\x20{$message}\12"; fwrite($myfile, $txt); fclose($myfile); }
Function Calls
None |
Stats
MD5 | 39f9b761d38128b10d6af2ebc40a74bc |
Eval Count | 0 |
Decode Time | 74 ms |