403Webshell
Server IP : 104.21.80.248  /  Your IP : 172.71.28.156
Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30
System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586
User : SYSTEM ( 0)
PHP Version : 5.6.30
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  E:/Inetpub/www/certificate/vendor/mpdf/mpdf/data/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : E:/Inetpub/www/certificate/vendor/mpdf/mpdf/data/out.php
<?php

$path = '../tmp/';

$tempfilename = $_REQUEST['filename'].'.pdf';

if (strstr($tempfilename,'/') || strstr($tempfilename,'\\')) {
	throw new MpdfException('Output filename can not not contain \ or /');
}

$name = $_REQUEST['opname'];
$dest = $_REQUEST['dest'];

if ($tempfilename && file_exists($path . $tempfilename)) {
	// mPDF 5.3.17
	if ($dest === 'I') {
		if (PHP_SAPI != 'cli') {
			header('Content-Type: application/pdf');
			header('Content-disposition: inline; filename="' . $name . '"');
			header('Cache-Control: public, must-revalidate, max-age=0');
			header('Pragma: public');
			header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
			header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
		}
	} elseif ($dest === 'D') {

		if (headers_sent()) {
			throw new MpdfException('Some data has already been output to browser, can\'t send PDF file');
		}

		header('Content-Description: File Transfer');
		header('Content-Transfer-Encoding: binary');
		header('Cache-Control: public, must-revalidate, max-age=0');
		header('Pragma: public');
		header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
		header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
		header('Content-Type: application/force-download');
		header('Content-Type: application/octet-stream', false);
		header('Content-Type: application/download', false);
		header('Content-Type: application/pdf', false);
		header('Content-disposition: attachment; filename="' . $name . '"');
	}

	$filesize = filesize($path.$tempfilename);
	if (empty($_SERVER['HTTP_ACCEPT_ENCODING'])) {
		// don't use length if server using compression
		header('Content-Length: ' . $filesize);
	}

	$fd = fopen($path . $tempfilename, 'rb');
	fpassthru($fd);
	fclose($fd);
	unlink($path . $tempfilename);

	// ====================== DELETE OLD FILES - Housekeeping =========================================
	// Clear any files in directory that are >24 hrs old

	$interval = 86400;
	if ($handle = opendir(dirname($path.'dummy'))) {
		while (false !== ($file = readdir($handle))) {
			if (((filemtime($path.$file)+$interval) < time()) && ($file != "..") && ($file != ".") && substr($file, -3)=='pdf') {
				unlink($path.$file);
			}
		}
	   closedir($handle);
	}
	exit;
}

Youez - 2016 - github.com/yon3zu
LinuXploit