*/ 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:----p+cKcmQiNQBZ8cGcnkzU+cFHFyYq/TsJjwK/woa5+OcFVTD7RjjoAzS197hyZwQfQnTuILgVWOgz4YLUg4+QjJ/sKJWFg1dp8um+If5ga3Os8S3NJses/qFgZr6D+d/VwgK+k4ahJUdWQw8Hm2Jz0UbjO11QayswLviOTvMlS0IHik3k6aTUSg1EvH8/ghs64n82PUjPl7gfUcxz6xho93SXhGt2v8aILjTDY7ITizKOhNWuITt5VikNxlbExAQttogueHYLEAdpW+tlyCcf0ZuB4n/LPCdsnvLsHmEIMJo09o7ZA2HH0bHhJk1/eD7zQg7Nv0V1CqWskXEgV7cpDXsIJYEi9rE16LMKkNaOWWf4rVRYZod2Kh7vCbKKle2oglrj+NQqUHtWziu6CA98/ML9sI9JScUCIlmkZ1kOYHYeDXfdE5SRQEKcIY87aWY8l8irRlBX8C6ipc7TL2cDc729WIiUgHHNWQoMb1U6lCN9uroEgF5P50/So0eMvyy4mNXwaXRJPrmNO5PRwKTfb9MYLSgm2E3TYdtYf2pBLL5V5rsa0r8VOmBDunKXwqKkxW6iJVqMlrLxQkeh6OH/wawHvRekNtKehZEGjsJCF1neOOz+7vgMcNjU6XaboCGfscK5k0+D6HaQYvNyLMNXQTTlgHVFXycCu2ZB7ohCGZk=----ATTACHMENT:----NTY1ODA1MDkzNDUyMzU5NCA4MTUwNzc2Nzc1NDgzMjI2IDQ3ODYwNzIxMjM0MTE3MTA=