%PDF- %PDF- 403WebShell
403Webshell
Server IP : 37.220.80.31  /  Your IP : 3.15.25.131
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64
User : www-root ( 1010)
PHP Version : 7.4.33
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 : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/main/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/main/admin/wizard_export.php
<?
require_once(dirname(__FILE__)."/../include/prolog_admin_before.php");
require_once($_SERVER["DOCUMENT_ROOT"].BX_ROOT."/modules/main/prolog.php");
require_once($_SERVER["DOCUMENT_ROOT"].BX_ROOT."/modules/main/classes/general/wizard.php");
require_once($_SERVER["DOCUMENT_ROOT"].BX_ROOT."/modules/main/classes/general/tar_gz.php");

if(!$USER->CanDoOperation('edit_php') || !check_bitrix_sessid())
	$APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));

IncludeModuleLangFile(__FILE__);

$ID = $_REQUEST["ID"];
$ID = str_replace("\\", "", $ID);
$ID = str_replace("/", "", $ID);

$bUseCompression = true;
if(!extension_loaded('zlib') || !function_exists("gzcompress"))
	$bUseCompression = false;

$HTTP_ACCEPT_ENCODING = "";

CheckDirPath($_SERVER['DOCUMENT_ROOT'].BX_PERSONAL_ROOT."/tmp/wizards/");
$tempFile = $_SERVER['DOCUMENT_ROOT'].BX_PERSONAL_ROOT."/tmp/wizards/".md5(uniqid(rand(), true).".tar.gz");
$wizardPath = $_SERVER["DOCUMENT_ROOT"].CWizardUtil::GetRepositoryPath().CWizardUtil::MakeWizardPath($ID);

$strError = "";

if(is_dir($wizardPath))
{
	$oArchiver = new CArchiver($tempFile, $bUseCompression);
	$success = $oArchiver->add("\"".$wizardPath."\"", false, $_SERVER["DOCUMENT_ROOT"].CWizardUtil::GetRepositoryPath());

	if ($success)
	{
		$filename = str_replace(":", "-", $ID);
		$filename = str_replace(array("\r", "\n"), "", $filename);

		header('Pragma: public');
		header('Cache-control: private');
		header('Accept-Ranges: bytes');
		header("Content-Length: ".filesize($tempFile));
		header("Content-Type: application/x-force-download; filename=".$filename.".tar.gz");
		header("Content-Disposition: attachment; filename=\"".$filename.".tar.gz\"");
		header("Content-Transfer-Encoding: binary");

		readfile($tempFile);
		unlink($tempFile);
	}
	else
	{
		$strError .= GetMessage("MAIN_WIZARD_EXPORT_ERROR");
		$arErrors = &$oArchiver->GetErrors();
		if(count($arErrors)>0)
		{
			$strError .= ":<br>";
			foreach ($arErrors as $value)
				$strError .= "[".$value[0]."] ".$value[1]."<br>";
		}
		else
			$strError .= ".<br>";
	}
}
else
	$strError .= GetMessage("MAIN_WIZARD_EXPORT_ERROR");

if ($strError <> '')
{
	$APPLICATION->SetTitle(GetMessage("MAIN_WIZARD_EXPORT_ERROR"));
	require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_after.php");

	CAdminMessage::ShowMessage($strError);

	require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/epilog_admin_before.php");
}
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/epilog_admin_after.php");
?>

Youez - 2016 - github.com/yon3zu
LinuXploit