403Webshell
Server IP : 209.209.40.120  /  Your IP : 216.73.217.112
Web Server : Microsoft-IIS/10.0
System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586
User : NEWWWW$ ( 0)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/HostingSpaces/admin/penpaleurope.com/backup/app/Penpal/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/HostingSpaces/admin/penpaleurope.com/backup/app/Penpal/galleryPicture.php
<?php
include "general.php";
//error_reporting(E_ALL);


// we first include the upload class, as we will need it here to deal with the uploaded file
include('./src/class.upload.php');

$palid =$_SESSION['palid'];
// set variables
$dir_dest = "./assets/img/subscribers/".$palid."/thumbnail/";//(isset($_GET['dir']) ? $_GET['dir'] : 'tmp');
$dir_pics = "./assets/img/subscribers/".$palid."/thumbnail/";//(isset($_GET['pics']) ? $_GET['pics'] : $dir_dest);
//$palid = $_SESSION['palid'];

  //$rotate = $_POST["rotate"];
//  $image_name = $_POST['image'];
//  echo $name."nosa";
  $handle = new Upload($_FILES['file']);

    // then we check if the file has been uploaded properly
    // in its *temporary* location in the server (often, it is /tmp)
 if ($handle ->file_is_image){
    if ($handle->uploaded) {
       $filename =generateRandom();
        // yes, the file is on the server
        // below are some example settings which can be used if the uploaded file is an image.
        //profile picture
        $handle->image_auto_rotate = true;
        $handle->file_new_name_body = $filename;
        $handle->image_convert = jpg;
        $handle->image_resize            = true;
        //$handle->image_ratio_y           = true;
        $handle->image_ratio_crop      = true;
        $handle->image_x                 = 200;
        $handle->image_y                 = 200;
        $handle->file_auto_rename = false;
        $handle->file_overwrite = true;
        if(($handle->image_src_x < 800) and ( image_src_y <  800)){

        //  echo "The Photo is too small. Please upload file above 180 Pixels for both width and height";
          $handle-> Clean();
          	echo "<p style='color:red'>The Photo is too small. Please upload file above 200 Pixels but  below 35000 pixels for both width and height </p>";
          die();
        }

        if(($handle->image_src_x > 3500) and ( image_src_y >  3500)){

        //  echo "The Photo is too small. Please upload file above 180 Pixels for both width and height";
          $handle-> Clean();
          echo "<p style='color:blue'>The Photo is too big. Please upload file above 200 Pixels and below 3500 pixels for both width and height </p>";
          die();
        }

        //$dir_dest = "./assets/img/subscribers/".$palid."/";//(isset($_GET['dir']) ? $_GET['dir'] : 'tmp');
        //$dir_pics = "./assets/img/subscribers/".$palid."/";//(isset($_GET['pics']) ? $_GET['pics'] : $dir_dest);

        // now, we start the upload 'process'. That is, to copy the uploaded file
        // from its temporary location to the wanted location
        // It could be something like $handle->Process('/home/www/my_uploads/');
        $handle->Process($dir_dest);
   }

  $dir_dest = "./assets/img/subscribers/".$palid."/gallery/";//(isset($_GET['dir']) ? $_GET['dir'] : 'tmp');
  $dir_pics = "./assets/img/subscribers/".$palid."/gallery/";//(isset($_GET['pics']) ? $_GET['pics'] : $dir_dest);
        // thumbnail picture
  if ($handle->processed) {
          $handle->file_new_name_body = $filename;
          $handle->image_convert = jpg;
          $handle->image_resize            = true;
          $handle->image_ratio_crop =true;
          //$handle->image_ratio_y           = true;
          $handle->image_x                 = 800;
          $handle->image_y                 = 800;
          $handle->file_auto_rename = false;
          $handle->file_overwrite = true;
        //  $dir_dest = "./uploades/small/";//(isset($_GET['dir']) ? $_GET['dir'] : 'tmp');
          //$dir_pics = "./uploades/small/";//(isset($_GET['pics']) ? $_GET['pics'] : $dir_dest);

          $handle->Process($dir_dest);
          if ($handle->processed) {
              $handle-> Clean();
              echo "<p style='color:blue'>Photo Uploaded Successfully To Gallery</p>";
              die();
          }
     }

}else{

  // not image file
  //echo "This is not an accepted image file. Kindly upload JPG, PNG or GIF ";

  //echo $handle->log;
  $handle-> Clean();
  echo "<p style='color:red'>This is not an accepted image file. Kindly upload JPG, PNG or GIF </p>";

  //echo "nosa";
  die();
}


?>

Youez - 2016 - github.com/yon3zu
LinuXploit