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 /* __________________________________________________ | Obfuscated by YAK P..

Decoded Output download

<?php 
/*   __________________________________________________ 
    |  Obfuscated by YAK Pro - Php Obfuscator  2.0.5   | 
    |              on 2020-03-01 14:03:53              | 
    |    GitHub: https://github.com/pk-fr/yakpro-po    | 
    |__________________________________________________| 
*/ 
 require_once "scripts.init.php"; use mikehaertl\shellcommand\Command; use App\Pisofi\TelnetManager; use App\Helpers\PisofiHelper; use App\Pisofi\PisofiServerEventHandler; use Carbon\Carbon; goto Ua8GO; jo8Ca: try { goto vrdUh; Ohpy1: if (!$H5p7x) { goto nfbKT; } goto mAtcS; cQxer: nfbKT: goto Vx8Kf; mAtcS: try { goto y6afB; dt9Tg: $HzxEk = explode("\xa", $HzxEk); goto o3rDf; kkBWR: A9L58: goto g0D_k; Uax_O: $HzxEk = $JMOsX->commands(); goto dt9Tg; v4SPJ: $SQAwV = $JMOsX->protocol(); goto VPfjd; Lyyx7: PisofiHelper::publishEvent(PisofiServerEventHandler::EVENT_ON_TELNET_RUN, ["message" => "Telnet Started"]); goto YqGUA; Da8MZ: $JMOsX->save(); goto X0yFS; BI7cj: qEoe0: goto efrK0; BDUD3: if (!$Xts1A) { goto A9L58; } goto DNl0E; VPfjd: myyRY($rjWpJ, intval($SVKOy), $SQAwV, function ($WZSlE) use(&$wicPI, &$GrHrp) { goto AmSds; yT9qv: $GrHrp = $GrHrp + 1; goto C8hqi; AmSds: PisofiHelper::publishEvent(PisofiServerEventHandler::EVENT_ON_TELNET_RUN, ["message" => $WZSlE]); goto KSLQF; bAnAl: $zk9Ci = $wicPI[$GrHrp]; goto yT9qv; C8hqi: return $zk9Ci; goto U8VYG; o06es: return false; goto htlE_; KSLQF: sleep(1); goto uMfvg; uMfvg: if (!($GrHrp < count($wicPI))) { goto xt8RI; } goto bAnAl; U8VYG: xt8RI: goto o06es; htlE_: }); goto P69Hu; lY8q0: $Xts1A = $Diy52->format("Y-m-d H:i:s"); goto GbjN2; g0D_k: PisofiHelper::publishEvent(PisofiServerEventHandler::EVENT_ON_TELNET_RUN, ["message" => "Last run not found..."]); goto lY8q0; y6afB: $Diy52 = Carbon::now(); goto HBblD; EZ74U: $rjWpJ = $JMOsX->host(); goto JfrRr; GbjN2: $JMOsX->lastRun($Xts1A); goto Da8MZ; o3rDf: $wicPI = array_map(function ($mCGsH) { return $mCGsH . "\xd\xa"; }, $HzxEk); goto hDAUR; hDAUR: $wicPI = array_merge($wicPI, ["\xd\xa", "exit"]); goto EZ74U; JFGVd: $king1 = intval($JMOsX->schedule()) * 60; goto oI4HK; JfrRr: $SVKOy = $JMOsX->port(); goto v4SPJ; X0yFS: mgOY_: goto wpERv; efrK0: goto mgOY_; goto kkBWR; DNl0E: $Xts1A = Carbon::parse($Xts1A); goto JFGVd; YqGUA: $GrHrp = 0; goto Uax_O; HBblD: $Xts1A = $JMOsX->lastRun(); goto BDUD3; n4YDl: $JMOsX->save(); goto BI7cj; P69Hu: $JMOsX->lastRun($Diy52->format("Y-m-d H:i:s")); goto n4YDl; oI4HK: if (!($Diy52->diffInSeconds($Xts1A) > $king1 || $WGHyO)) { goto qEoe0; } goto Lyyx7; wpERv: } catch (\Exception $GwWKg) { goto QCpJn; gTcO3: $JMOsX->lastRun($Xts1A); goto qEmel; QCpJn: $Xts1A = Carbon::now()->format("Y-m-d H:i:s"); goto gTcO3; qEmel: $JMOsX->save(); goto OWhNY; OWhNY: } goto cQxer; vrdUh: $H5p7x = $JMOsX->enabled(); goto Ohpy1; Vx8Kf: } catch (\Exception $GwWKg) { } goto MbhjB; Ua8GO: $JMOsX = new TelnetManager(); goto vO74l; vO74l: $WGHyO = isset($argv[1]) ? $argv[1] == "force" : false; goto jo8Ca; MbhjB: function MYYRy($rjWpJ, $SVKOy, $SQAwV = "tcp", $bjzmE = null) { goto YjW1V; jFV5Y: foreach ($Vh5Md as $CyZSv) { goto XfdM3; b9EW6: nFVAi: goto zQqNN; gdtrh: zWy7Z: goto kYGIh; QwdrL: EMRk7: goto iK4s4; sKimY: if (!$Lj7R6) { goto vIDwP; } goto u31M3; oOQ1H: die(PHP_EOL . "Connection closed"); goto QwdrL; zQqNN: goto EMRk7; goto ZwcYt; TxnfG: YkGJ7: goto sKimY; kzOLp: $Tz6Mz = $bjzmE($WZSlE); goto YoXdc; U63WN: if (!is_callable($bjzmE)) { goto nFVAi; } goto kzOLp; bKaxn: vsAoz: goto b9EW6; bfMYH: PisofiHelper::publishEvent(PisofiServerEventHandler::EVENT_ON_TELNET_RUN, ["message" => "DONE"]); goto P4f9y; ZwcYt: lbpEI: goto K7FSU; XfdM3: if (!($CyZSv == $Lj7R6)) { goto eYg8g; } goto czYv6; K7FSU: PisofiHelper::publishEvent(PisofiServerEventHandler::EVENT_ON_TELNET_RUN, ["message" => "Connection closed"]); goto oOQ1H; S0Msu: vIDwP: goto bKaxn; UlyPC: goto vsAoz; goto TxnfG; czYv6: $WZSlE = stream_get_contents($Lj7R6); goto D5JGj; D5JGj: if (!$WZSlE) { goto lbpEI; } goto U63WN; u31M3: fputs($Lj7R6, $Tz6Mz); goto S0Msu; iK4s4: eYg8g: goto gdtrh; P4f9y: return; goto UlyPC; YoXdc: if ($Tz6Mz !== false) { goto YkGJ7; } goto bfMYH; kYGIh: } goto R_KNM; h9v3l: PisofiHelper::publishEvent(PisofiServerEventHandler::EVENT_ON_TELNET_RUN, ["message" => "Unable to connect: Connection timed out..."]); goto NH58F; B3irZ: PisofiHelper::publishEvent(PisofiServerEventHandler::EVENT_ON_TELNET_RUN, ["message" => "Error reading from socket"]); goto IX4Vu; NH58F: die; goto JtCEH; gq5de: stream_set_blocking($Lj7R6, 0); goto ao38l; ebpYq: $bWUMd = null; goto DpPH0; DpPH0: $fLQLO = null; goto OFm_T; mTgRr: if (!($HT0gv = stream_get_meta_data($Lj7R6) && isset($HT0gv["timeout"]) && $HT0gv["timeout"])) { goto p9FG4; } goto h9v3l; Lshdb: PisofiHelper::publishEvent(PisofiServerEventHandler::EVENT_ON_TELNET_RUN, ["message" => "Connected to host: " . $SQAwV . "://" . $rjWpJ . ":" . $SVKOy]); goto gq5de; bYYQR: goto ISYom; goto CspCc; aqJdq: r2Nyh: goto mTgRr; ao38l: ISYom: goto ku8wN; OFm_T: if (stream_select($Vh5Md, $bWUMd, $fLQLO, null) !== false) { goto wvPa2; } goto B3irZ; IX4Vu: die; goto brmum; brmum: goto k96sH; goto b6Zvd; YjW1V: if ($Lj7R6 = @fsockopen($SQAwV . "://" . $rjWpJ, $SVKOy, $eOEUB, $odOe7)) { goto r2Nyh; } goto S_ly6; CspCc: yK3uR: goto QwQSD; b6Zvd: wvPa2: goto jFV5Y; R_KNM: JJ4Ul: goto xkYOI; xkYOI: k96sH: goto bYYQR; ku8wN: if (!true) { goto yK3uR; } goto ao68N; ao68N: $Vh5Md = array($Lj7R6); goto ebpYq; JtCEH: p9FG4: goto Lshdb; QQcnr: die; goto aqJdq; S_ly6: PisofiHelper::publishEvent(PisofiServerEventHandler::EVENT_ON_TELNET_RUN, ["message" => "Unable to connect to " . $SQAwV . "://" . $rjWpJ . ":" . $SVKOy . " with error: " . $odOe7]); goto QQcnr; QwQSD: } ?>

Did this file decode correctly?

Original Code

<?php
/*   __________________________________________________
    |  Obfuscated by YAK Pro - Php Obfuscator  2.0.5   |
    |              on 2020-03-01 14:03:53              |
    |    GitHub: https://github.com/pk-fr/yakpro-po    |
    |__________________________________________________|
*/
 require_once "\x73\x63\162\x69\160\x74\x73\x2e\x69\156\x69\164\56\x70\x68\160"; use mikehaertl\shellcommand\Command; use App\Pisofi\TelnetManager; use App\Helpers\PisofiHelper; use App\Pisofi\PisofiServerEventHandler; use Carbon\Carbon; goto Ua8GO; jo8Ca: try { goto vrdUh; Ohpy1: if (!$H5p7x) { goto nfbKT; } goto mAtcS; cQxer: nfbKT: goto Vx8Kf; mAtcS: try { goto y6afB; dt9Tg: $HzxEk = explode("\xa", $HzxEk); goto o3rDf; kkBWR: A9L58: goto g0D_k; Uax_O: $HzxEk = $JMOsX->commands(); goto dt9Tg; v4SPJ: $SQAwV = $JMOsX->protocol(); goto VPfjd; Lyyx7: PisofiHelper::publishEvent(PisofiServerEventHandler::EVENT_ON_TELNET_RUN, ["\x6d\145\x73\x73\141\x67\x65" => "\x54\x65\x6c\156\x65\x74\40\123\x74\x61\x72\x74\x65\144"]); goto YqGUA; Da8MZ: $JMOsX->save(); goto X0yFS; BI7cj: qEoe0: goto efrK0; BDUD3: if (!$Xts1A) { goto A9L58; } goto DNl0E; VPfjd: myyRY($rjWpJ, intval($SVKOy), $SQAwV, function ($WZSlE) use(&$wicPI, &$GrHrp) { goto AmSds; yT9qv: $GrHrp = $GrHrp + 1; goto C8hqi; AmSds: PisofiHelper::publishEvent(PisofiServerEventHandler::EVENT_ON_TELNET_RUN, ["\155\x65\163\x73\141\x67\x65" => $WZSlE]); goto KSLQF; bAnAl: $zk9Ci = $wicPI[$GrHrp]; goto yT9qv; C8hqi: return $zk9Ci; goto U8VYG; o06es: return false; goto htlE_; KSLQF: sleep(1); goto uMfvg; uMfvg: if (!($GrHrp < count($wicPI))) { goto xt8RI; } goto bAnAl; U8VYG: xt8RI: goto o06es; htlE_: }); goto P69Hu; lY8q0: $Xts1A = $Diy52->format("\x59\x2d\x6d\x2d\x64\x20\x48\72\x69\x3a\163"); goto GbjN2; g0D_k: PisofiHelper::publishEvent(PisofiServerEventHandler::EVENT_ON_TELNET_RUN, ["\x6d\x65\163\163\x61\147\145" => "\114\141\x73\164\x20\x72\165\156\40\156\157\164\40\x66\x6f\x75\156\144\56\56\56"]); goto lY8q0; y6afB: $Diy52 = Carbon::now(); goto HBblD; EZ74U: $rjWpJ = $JMOsX->host(); goto JfrRr; GbjN2: $JMOsX->lastRun($Xts1A); goto Da8MZ; o3rDf: $wicPI = array_map(function ($mCGsH) { return $mCGsH . "\xd\xa"; }, $HzxEk); goto hDAUR; hDAUR: $wicPI = array_merge($wicPI, ["\xd\xa", "\x65\170\151\164"]); goto EZ74U; JFGVd: $king1 = intval($JMOsX->schedule()) * 60; goto oI4HK; JfrRr: $SVKOy = $JMOsX->port(); goto v4SPJ; X0yFS: mgOY_: goto wpERv; efrK0: goto mgOY_; goto kkBWR; DNl0E: $Xts1A = Carbon::parse($Xts1A); goto JFGVd; YqGUA: $GrHrp = 0; goto Uax_O; HBblD: $Xts1A = $JMOsX->lastRun(); goto BDUD3; n4YDl: $JMOsX->save(); goto BI7cj; P69Hu: $JMOsX->lastRun($Diy52->format("\131\x2d\155\55\x64\x20\110\72\x69\72\x73")); goto n4YDl; oI4HK: if (!($Diy52->diffInSeconds($Xts1A) > $king1 || $WGHyO)) { goto qEoe0; } goto Lyyx7; wpERv: } catch (\Exception $GwWKg) { goto QCpJn; gTcO3: $JMOsX->lastRun($Xts1A); goto qEmel; QCpJn: $Xts1A = Carbon::now()->format("\131\x2d\x6d\x2d\144\40\110\x3a\x69\x3a\x73"); goto gTcO3; qEmel: $JMOsX->save(); goto OWhNY; OWhNY: } goto cQxer; vrdUh: $H5p7x = $JMOsX->enabled(); goto Ohpy1; Vx8Kf: } catch (\Exception $GwWKg) { } goto MbhjB; Ua8GO: $JMOsX = new TelnetManager(); goto vO74l; vO74l: $WGHyO = isset($argv[1]) ? $argv[1] == "\146\x6f\x72\x63\145" : false; goto jo8Ca; MbhjB: function MYYRy($rjWpJ, $SVKOy, $SQAwV = "\164\x63\160", $bjzmE = null) { goto YjW1V; jFV5Y: foreach ($Vh5Md as $CyZSv) { goto XfdM3; b9EW6: nFVAi: goto zQqNN; gdtrh: zWy7Z: goto kYGIh; QwdrL: EMRk7: goto iK4s4; sKimY: if (!$Lj7R6) { goto vIDwP; } goto u31M3; oOQ1H: die(PHP_EOL . "\x43\x6f\156\x6e\x65\143\x74\151\x6f\x6e\x20\x63\x6c\x6f\163\145\x64"); goto QwdrL; zQqNN: goto EMRk7; goto ZwcYt; TxnfG: YkGJ7: goto sKimY; kzOLp: $Tz6Mz = $bjzmE($WZSlE); goto YoXdc; U63WN: if (!is_callable($bjzmE)) { goto nFVAi; } goto kzOLp; bKaxn: vsAoz: goto b9EW6; bfMYH: PisofiHelper::publishEvent(PisofiServerEventHandler::EVENT_ON_TELNET_RUN, ["\x6d\145\x73\x73\141\x67\145" => "\x44\x4f\x4e\105"]); goto P4f9y; ZwcYt: lbpEI: goto K7FSU; XfdM3: if (!($CyZSv == $Lj7R6)) { goto eYg8g; } goto czYv6; K7FSU: PisofiHelper::publishEvent(PisofiServerEventHandler::EVENT_ON_TELNET_RUN, ["\x6d\145\163\163\141\x67\145" => "\x43\x6f\x6e\156\145\x63\164\x69\157\156\40\x63\x6c\157\x73\145\144"]); goto oOQ1H; S0Msu: vIDwP: goto bKaxn; UlyPC: goto vsAoz; goto TxnfG; czYv6: $WZSlE = stream_get_contents($Lj7R6); goto D5JGj; D5JGj: if (!$WZSlE) { goto lbpEI; } goto U63WN; u31M3: fputs($Lj7R6, $Tz6Mz); goto S0Msu; iK4s4: eYg8g: goto gdtrh; P4f9y: return; goto UlyPC; YoXdc: if ($Tz6Mz !== false) { goto YkGJ7; } goto bfMYH; kYGIh: } goto R_KNM; h9v3l: PisofiHelper::publishEvent(PisofiServerEventHandler::EVENT_ON_TELNET_RUN, ["\x6d\x65\163\x73\141\147\x65" => "\x55\x6e\141\142\154\x65\40\x74\157\40\143\x6f\156\156\145\143\x74\x3a\x20\103\157\156\x6e\145\143\164\151\157\x6e\x20\x74\x69\155\145\x64\x20\x6f\x75\x74\x2e\56\x2e"]); goto NH58F; B3irZ: PisofiHelper::publishEvent(PisofiServerEventHandler::EVENT_ON_TELNET_RUN, ["\x6d\145\163\163\141\x67\145" => "\105\x72\x72\x6f\162\40\162\x65\141\x64\x69\x6e\x67\40\146\162\157\x6d\x20\163\157\143\x6b\x65\164"]); goto IX4Vu; NH58F: die; goto JtCEH; gq5de: stream_set_blocking($Lj7R6, 0); goto ao38l; ebpYq: $bWUMd = null; goto DpPH0; DpPH0: $fLQLO = null; goto OFm_T; mTgRr: if (!($HT0gv = stream_get_meta_data($Lj7R6) && isset($HT0gv["\164\x69\x6d\145\157\x75\164"]) && $HT0gv["\164\x69\x6d\x65\x6f\165\164"])) { goto p9FG4; } goto h9v3l; Lshdb: PisofiHelper::publishEvent(PisofiServerEventHandler::EVENT_ON_TELNET_RUN, ["\155\145\x73\x73\x61\147\145" => "\x43\x6f\156\156\145\x63\164\145\144\x20\x74\x6f\40\x68\157\x73\164\72\40" . $SQAwV . "\72\x2f\x2f" . $rjWpJ . "\72" . $SVKOy]); goto gq5de; bYYQR: goto ISYom; goto CspCc; aqJdq: r2Nyh: goto mTgRr; ao38l: ISYom: goto ku8wN; OFm_T: if (stream_select($Vh5Md, $bWUMd, $fLQLO, null) !== false) { goto wvPa2; } goto B3irZ; IX4Vu: die; goto brmum; brmum: goto k96sH; goto b6Zvd; YjW1V: if ($Lj7R6 = @fsockopen($SQAwV . "\72\x2f\57" . $rjWpJ, $SVKOy, $eOEUB, $odOe7)) { goto r2Nyh; } goto S_ly6; CspCc: yK3uR: goto QwQSD; b6Zvd: wvPa2: goto jFV5Y; R_KNM: JJ4Ul: goto xkYOI; xkYOI: k96sH: goto bYYQR; ku8wN: if (!true) { goto yK3uR; } goto ao68N; ao68N: $Vh5Md = array($Lj7R6); goto ebpYq; JtCEH: p9FG4: goto Lshdb; QQcnr: die; goto aqJdq; S_ly6: PisofiHelper::publishEvent(PisofiServerEventHandler::EVENT_ON_TELNET_RUN, ["\155\145\x73\163\x61\147\145" => "\125\156\141\142\154\145\40\x74\157\40\x63\x6f\156\x6e\x65\143\164\x20\x74\x6f\40" . $SQAwV . "\72\57\x2f" . $rjWpJ . "\x3a" . $SVKOy . "\x20\167\151\164\x68\x20\145\162\162\x6f\x72\x3a\x20" . $odOe7]); goto QQcnr; QwQSD: }

Function Calls

None

Variables

None

Stats

MD5 1c8dfa086640ee0994217da452c6552b
Eval Count 0
Decode Time 129 ms