Update exectool.php
This commit is contained in:
parent
313d4d0598
commit
5e1879682b
|
@ -7,12 +7,13 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
exec_test() executes a command (like "whoami") with different
|
||||
PHP functions in order to figure out which fuctions are supported
|
||||
in the webserver configuration. The function execTests returns an array, which
|
||||
contains names of all successful tested PHP functions.
|
||||
*/
|
||||
function exec_test() {
|
||||
* exec_test() executes a command (like "whoami") with different
|
||||
* PHP functions in order to figure out which fuctions are supported
|
||||
* in the webserver configuration. The function execTests returns an array, which
|
||||
* contains names of all successful tested PHP functions.
|
||||
*/
|
||||
if(!function_exists("exec_test")) {
|
||||
function exec_test() {
|
||||
$cmd = "whoami";
|
||||
$cmdPath = "/usr/bin/whoami";
|
||||
$return = "";
|
||||
|
@ -95,12 +96,14 @@ function exec_test() {
|
|||
}
|
||||
|
||||
return $methodArray;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
exec_command() executes a command (like "whoami") with the submited method
|
||||
*/
|
||||
function exec_command($command, $method) {
|
||||
* exec_command() executes a command (like "whoami") with the submited method
|
||||
*/
|
||||
if(!function_exists("exec_command")) {
|
||||
function exec_command($command, $method) {
|
||||
if ($method == "") {
|
||||
|
||||
// ob_start() will turn on output buffering to collect all output from
|
||||
|
@ -166,4 +169,5 @@ function exec_command($command, $method) {
|
|||
echo "[!] No method defined";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user