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