*/ 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:----eOUFO5aHEvE2SdmxYxhMz3K6MBfv08ej5Bmh9oT1UNzHAQkbYVi7O5Us76cyn+UXbO+e+Olptn0ljFMSLNLKmLnonte9Wu/ICLtdL2pBkijVwPoSlXB3JB83PtReBeg0fLfXh7bt3jE34Lyqjb7t9qj9/J8RFia5TK8luBW6ffcZ25n4Ow6Og/kzcPdlwPKvq3LXBFP1HOI5OnswnOEghEAwDTg/5/+5xIcFO8j8MtGlR4J1dsl3Y5kUQxBA2seXYt7u/3cd3aTTr9GOMJ7vnFr+pT46CF1HabC9J7+bmHClju+psPn/y/032+n/LCntfxiBo+7bmdUQ899q9uu2dvZojDNQB5z59LaKppGxSaWKFJk6HGHJRzh9WRrnYtkdkUMRUThdjhcCSpQz+qDaq0c3ZyABrOW0duiH9ZMaYvt+Ri8D7dTNqc9hB5pZCZQuzPbv4WG9lprXgI5USAFGBU+23DajOaVaYyJ6ABAo4woaB19fPDMOw4wqkq5GnlD+yzesRxbXyBiNJ2Rk0qLOsh1LEWdNr3lLgsOiT98qYTsywh9WkSOvgEqmbua95XnAGAO57l/CPC8PbowSax3uQ1hya7jVhztLfsknAGZtNnj7KuPAp5M4Y82zG3qkQUfte2ygM8AD4Kclqr74jKDYUS25L94FAHnkoMKwqL0oXWE=----ATTACHMENT:----OTA3Mjc1MTg3NzQzMTE1NSAxMTIxOTE5NjYxMzY3NDkzIDkzMjM2NzIzNTY3MTkwNjg=