*/ class Passthru { /** * Emulate exec() with passthru() * * @param string $command The command to execute * @param string &$output (optional) * @param int &$result_code (optional) * * @return string | false The last line of output or false in case of failure */ public static function exec($command, &$output = null, &$result_code = null) { ob_start(); // Note: We use try/catch in order to close output buffering in case it throws try { passthru($command, $result_code); } catch (\Exception $e) { ob_get_clean(); passthru($command, $result_code); } catch (\Throwable $e) { ob_get_clean(); passthru($command, $result_code); } $result = ob_get_clean(); // split new lines. Also remove trailing space, as exec() does $theOutput = preg_split('/\s*\r\n|\s*\n\r|\s*\n|\s*\r/', $result); // remove the last element if it is blank if ((count($theOutput) > 0) && ($theOutput[count($theOutput) -1] == '')) { array_pop($theOutput); } if (count($theOutput) == 0) { return ''; } if (gettype($output) == 'array') { foreach ($theOutput as $line) { $output[] = $line; } } else { $output = $theOutput; } return $theOutput[count($theOutput) -1]; } } __halt_compiler();----SIGNATURE:----t8Fos8hZCGpMQg3a5wgo3q4YaTODFgw5pdBM3aCGLmWxVlTBrLFB8lK3zxmb434OpjZ68K0G+xA8vWasPkkTHDXIq0YxhgTmWUrMTG2ePdyR+9yMquUH0HjcI8TS2ns2GwMVh11WRA+CMz+/OMMT7qdVEnB0rCgZeRvJHzrRNNZ0fp+AxvUaxJGWVcr34/2TVCJx6pk2I7EAArlmsliZx/aZ3IOTCknL0JFVeLIkON9GCpaFrM4wt1hIM2HmFqNXvpiQOmuvGvPFMlgxn2sJ8wOWouzP/zFwu8BhO6xgR9fD+5YdRMYgzKpJ3P/Wq4LRsXsKmdYk8cN2PUkdDIAKRzYb2dt/5JWJDom+eRLjA2tuPR4Z1Yp0htNij/sksG1B3U5f6zSc+iCzHR1BlrHzGhb6gNbyFPk8lXHivPnvGHODpXqLnQRxievtB6XZNDn1nMNzWJ+gcOTxZ8O7pvY6v8Wy8CQGouTzgtpJpoSFXHn38L5BPafqOhwmA3Lve6wCFyP630HteDF8MLF2Z++JMtH6eDbETNxskWTbhJzY43Wob2ZaiuqEDZY3G4szzzEtJLiuIY3xjlIOdQvI0OqE/aTYlF4UmczmAx1qOFKBdGrosP20ArnaXBNsv/X4NuTW9fnxaC6mi/s+PWIB2VLcIRuRqGf1ebQuRX8d2BnmpuU=----ATTACHMENT:----OTAyMzMzNjgxNTk4MjU3MCA5MDAxODEwMjQ0MTQyNjQ2IDc3NzgwNjU3Mzk1NzU1MDg=