コード例 #1
0
function CheckRequirement()
{
    global $argv;
    $error = false;
    if (version_compare(PHP_VERSION, '5.4.0', '<')) {
        printf("%s\n", "Your PHP Version is: " . PHP_VERSION . ". Recommend PHP Version is PHP 5.4 .");
    }
    $curl = isCallable('curl_init');
    if (!$curl) {
        printf("%s\n", "Wordpress Vulnerability Scanner require cURL Extension.");
        $error = true;
    }
    // nawawi: md5_file need this
    if (!ini_get('allow_url_fopen')) {
        echo "Wordpress Vulnerability Scanner require allow_url_fopen set to true\n";
        $error = true;
    }
    if ($error) {
        exit;
    }
}
コード例 #2
0
if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
    exit;
}
include_once dirname(dirname(__FILE__)) . "/engine/start.php";
$postdata = file_get_contents("php://input");
if ($postdata) {
    $request = json_decode($postdata);
    $function = $request->function;
    $key = $request->key;
    if (isset($request->data)) {
        if (is_object($request->data)) {
            $data = object_to_array($request->data);
        } else {
            $data = $request->data;
        }
    } else {
        $data = array();
    }
    $secret = SITESECRET;
    if ($key == $secret) {
        if (isCallable($function)) {
            $function = "SocialApparatus\\" . $function;
            $results = $function($data);
            if (is_array($results)) {
                echo json_encode($results);
            } else {
                echo $results;
            }
        }
    }
}
コード例 #3
0
ファイル: colander.php プロジェクト: netom/colander
function fIsCallable()
{
    return function ($d) {
        return isCallable($d);
    };
}