403Webshell
Server IP : 85.158.181.41  /  Your IP : 216.73.217.12
Web Server : Apache
System : Linux cloud9-vm129 6.1.178+1-ph #ph SMP PREEMPT_DYNAMIC Wed Jul 29 09:00:54 UTC 2026 x86_64
User : moncbefd ( 1024)
PHP Version : 7.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/moncbefd/www.moneta.at/system/classes/customizer/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/moncbefd/www.moneta.at/system/classes/customizer/GPrintDownloadAjaxHandler.inc.php
<?php
/* --------------------------------------------------------------
   GPrintDownloadAjaxHandler.inc.php 2013-11-14 gm
   Gambio GmbH
   http://www.gambio.de
   Copyright (c) 2013 Gambio GmbH
   Released under the GNU General Public License (Version 2)
   [http://www.gnu.org/licenses/gpl-2.0.html]
   --------------------------------------------------------------
*/

require_once(DIR_FS_CATALOG . 'gm/modules/gm_gprint_tables.php');

class GPrintDownloadAjaxHandler extends AjaxHandler
{
	function get_permission_status($p_customers_id=NULL)
	{
		return true;
	}

	function proceed()
	{
		$c_download_key = gm_prepare_string($this->v_data_array['GET']['key']);

		$t_get_file_data = xtc_db_query("SELECT 
											filename,
											encrypted_filename
										FROM " . TABLE_GM_GPRINT_UPLOADS . "
										WHERE download_key = '" . $c_download_key . "'");	
		if(xtc_db_num_rows($t_get_file_data) == 1)
		{
			$t_file_data = xtc_db_fetch_array($t_get_file_data);

			$t_decrypted_filename = basename($t_file_data['filename']);
			$t_encrypted_filename = basename($t_file_data['encrypted_filename']);

			$t_filename = DIR_FS_CATALOG . 'gm/customers_uploads/gprint/' . $t_encrypted_filename;


			if(file_exists($t_filename)){
				header('Content-Description: File Transfer');
				header("Content-Type: application/octet-stream");
				header('Content-Disposition: attachment; filename="' . $t_decrypted_filename . '"');
				header('Content-Transfer-Encoding: binary');
				header('Expires: 0');
				header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
				header('Pragma: public');
				header('Content-Length: ' . filesize($t_filename));
				ob_clean();
				flush();

				readfile($t_filename);
			}	
			else
			{
				$this->v_output_buffer = 'Error: File does not exist!';
			}
		}
		else
		{
			$this->v_output_buffer = 'Error: File does not exist!';
		}

		return true;
	}
}
?>

Youez - 2016 - github.com/yon3zu
LinuXploit