Update exectool.php

This commit is contained in:
Namhyeon Go 2018-09-26 20:38:19 +09:00 committed by GitHub
parent f29a12596a
commit a94501b20a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,7 +104,7 @@ if(!function_exists("exec_test")) {
* exec_command() executes a command (like "whoami") with the submited method
*/
if(!function_exists("exec_command")) {
function exec_command($command, $method="shell_exec") {
function exec_command($command, $method="shell_exec", $options=array()) {
$return = false;
if ($method == "") {
@ -175,6 +175,15 @@ if(!function_exists("exec_command")) {
$return = ob_get_clean();
// save to cache
$fw = write_stroage_file($return, array(
"storage_type" => "cache",
"filename" => get_hashed_text($return, array(
"salt" => true,
"2p" => true
))
));
return $return;
}
}